RE: [PHP] 3rd include

From: Date: Wed, 08 Aug 2001 20:30:59 +0000
Subject: RE: [PHP] 3rd include
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61904@lists.php.net to get a copy of this message
Ok. That is it. Sorry for the confusion and thank you for the help. --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 3:14 PM >> To: Mark Roedel >> Cc: php-general@lists.php.net >> Subject: RE: [PHP] 3rd include >> >> >> If a file is included from within a function, this would limit the >> variable cope of this file, correct? > >Yes it would. (Specifically, it would mean that everything in that file >operates at the same scope as the function in which it's included. >That, in turn, means that $HTTP_POST_VARS is likely only available if >it's been declared as global within that function. > > >--- >Mark Roedel (roedelm@letu.edu) || "There cannot be a crisis next week. >Systems Programmer / WebMaster || My schedule is already full." > LeTourneau University || -- Henry Kissinger > > > >> 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 (#61904) next »