RE: [PHP] 3rd include

From: Date: Wed, 08 Aug 2001 20:13:40 +0000
Subject: RE: [PHP] 3rd include
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61899@lists.php.net to get a copy of this message
If a file is included from within a function, this would limit the variable cope of this file, correct? --Drew Vogel On Wed, 8 Aug 2001, Mark Roedel wrote: >> -----Original Message----- >> From: Drew P. Vogel [mailto:dvogel@intercarve.net] >> Sent: Wednesday, August 08, 2001 2:19 PM >> To: Mark Roedel >> Cc: php-general@lists.php.net >> Subject: RE: [PHP] 3rd include >> >> >> You're right. It is not discuessed there. My memory served me >> incorrectly. >> >> In index.php (the file loaded by php), >> echo( $HTTP_POST_VARS["last_name"] ); >> will print the variable contents, but in save_script.php >> (the 3rd file included) the same function call will print >> nothing. > >Are you quite sure there's not something else going on here? (An issue >of the $HTTP_POST_VARS array being out-of-scope inside a function, for >example?) I'm sure I would have run into this behavior by now if it >were a system bug. > >For whatever it's worth, I just did a test, with includes nested ten >deep, and $HTTP_POST_VARS kept its value at every level. (PHP 4.0.6, >Apache 1.3.20, FreeBSD 4-Stable) > > >--- >Mark Roedel (roedelm@letu.edu) || "There cannot be a crisis next week. >Systems Programmer / WebMaster || My schedule is already full." > LeTourneau University || -- Henry Kissinger > >

« previous php.general (#61899) next »