recursive problem

From: Date: Tue, 06 Mar 2001 17:32:08 +0000
Subject: recursive problem
Groups: php.general 
Request: Send a blank email to php-general+get-42781@lists.php.net to get a copy of this message
Hello, I've got a script that recurses to build a path name (it's more complex than that). The script uses static variables to do this. Based on certain conditions, the script might cause a redirect. I find that when the script redirects, the value of the static variable is not reset, and I get a doubled path. So instead of: $path == path/to/first/script I get $path == path/to/first/script/path/to/second/script I tried resetting $path based upon the whether or not a flag variable like $is_redirect is in existence, but all other variables seemed to be reset when the browser redirects...which is what you'd expect, except these static variables seem to keep their value. any ideas? TIA, Doug Brewer

« previous php.general (#42781) next »