Re: Bug #14341 Updated: include() html vs file system - variable scope
| From: | Daniel Lorch | Date: | Tue, 04 Dec 2001 23:12:52 +0000 |
| Subject: | Re: Bug #14341 Updated: include() html vs file system - variable scope | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-72528@lists.php.net to get a copy of this message | ||
Hi,
Didn't I mention this before?
> $rootFile = "/accounts/www73038/www/www.art-co-op.net/";
> [..]
> include($rootFile . "/html/test/test_abs_file.php");
now, here's a slash too much.
by including a file remotely, it is
1. executed by Apache/PHP
2. the OUTPUT of this script is included, NOT the source, thus
$inc_abs_http will NEVER be passed over to test.php
as you see, your script doesn't output '1' here (and test.php is
actually including this OUTPUT, and nothing else. NO source or
whatsoever):
http://shell9.vhosting.com/www73038/test/test_abs_http.php
you *could* rename test_abs_http.php to test_abs_http.inc or .txt (or
any other extension which isn't processed by PHP), but as I already
mentioned before, that would be a bad practice (unless you don't mind
or actually even encourage people to see your code).
this is definitively NOT a PHP BUG.
Kind Regards,
Daniel Lorch