note 31447 rejected from function.include-once by spic
| From: | spic@php.net | Date: | Tue, 22 Apr 2003 15:30:56 +0000 |
| Subject: | note 31447 rejected from function.include-once by spic | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-46933@lists.php.net to get a copy of this message | ||
When I first began using include files, I continued to run across a peculiar problem, which I need
to work out more and verify. Whenever you attempted to include a file which contained PHP
functions, the included file would not know exactly what page it was.
For example,
# A.php
function Print_PHP_Self ()
{
print $_SERVER["PHP_SELF"];
}
# B.php
include_once "./A.php";
// This would result in A.php printing out "B.php"
In order to get around this, I found out that if you use a complete file path to the file in which
you want to include, then it will recognize itself properly.
Once again, I need to do more testing to verify this again, but wanted to see if anyone had any
experience with this problem.
Best regards,
Andy