ID: 14341
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Summary: include() html vs file system - variable scope
Status: Open
Bug Type: Scripting Engine problem
Operating System: FreeBSD
PHP Version: 4.1.0
New Comment:

hi, 

i have discovered a bug relating to the scope of variables surrounding and within 
include
files. 

when i was using a http path for an include command, the include file could only see
variables instantiated within the include file. all variables instantiated within the
include could not be seen by the page calling the include.

however this was not the case when i used a relative path or absolute path using the 
file
system. for example:

$rootFile = "/accounts/www73038/www/www.art-co-op.net/html";
$rootDir = "http://shell9.vhosting.com/www73038";;

include(../../includes/inc_file); //-- works
include($rootFile. "/includes/inc_file); //-- works
include($rootHttp. "/includes/inc_file); //-- fails

i'm not sure whether this is by design (i'm new to php & in the process of reforming
my evil microsoft ways). and i could not find mention of it in the documentation. 

if you would like to find more information regarding my server and environment:
http://shell9.vhosting.com/www73038/phpinfo.php

thank you,

tim neill.


Previous Comments:
------------------------------------------------------------------------

[2001-12-04 14:32:41] [EMAIL PROTECTED]

hi, 

i have discovered a bug relating to the scope of variables surrounding and within 
include files. 

when i was using a http path for an include command, the include file could only see 
variables instantiated within the include file. all variables instantiated within the 
include could not be seen by the page calling the include.

however this was not the case when i used a relative path or absolute path using the 
file system. for example:

$rootFile = "/accounts/www73038/www/www.art-co-op.net/html";
$rootDir = "http://shell9.vhosting.com/www73038";;

include(../../includes/inc_file); //-- works
include($rootFile. "/includes/inc_file); //-- works
include($rootHttp. "/includes/inc_file); //-- fails

i'm not sure whether this is by design (i'm new to php & in the process of reforming 
my evil microsoft ways). and i could not find mention of it in the documentation. 

if you would like to find more information regarding my server and environment:
http://shell9.vhosting.com/www73038/phpinfo.php

thank you,

tim neill.

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14341&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to