Re: [PHP] how to get the absolute path of an included file?

2006-04-28 Thread Bing Du
Thanks all who replied. So the include path used in file2.php should be relative to the working directory where file2.php is located. Yes, I have error_reporting=E_ALL in my php.ini. The log shows include_path=.|. But in my situation, it took me a while to figure out what that '.' really

[PHP] how to get the absolute path of an included file?

2006-04-27 Thread Bing Du
Hello, Here are the two scripts. The result is 'var is' rather than 'var is foo'. My suspect is I did not set the file path right in 'include'. So in file2.php, how should I get the actual absolute path it really gets for file1.php? Is it stored in some environment variable or something? I'd

Re: [PHP] how to get the absolute path of an included file?

2006-04-27 Thread Brad Bonkoski
Bing Du wrote: Hello, Here are the two scripts. The result is 'var is' rather than 'var is foo'. My suspect is I did not set the file path right in 'include'. So in file2.php, how should I get the actual absolute path it really gets for file1.php? Is it stored in some environment

RE: [PHP] how to get the absolute path of an included file?

2006-04-27 Thread Ford, Mike
On 27 April 2006 15:25, Brad Bonkoski wrote: Bing Du wrote: Hello, Here are the two scripts. The result is 'var is' rather than 'var is foo'. My suspect is I did not set the file path right in 'include'. So in file2.php, how should I get the actual absolute path it really gets

Re: [PHP] how to get the absolute path of an included file?

2006-04-27 Thread Barry
Brad Bonkoski schrieb: Bing Du wrote: Hello, Here are the two scripts. The result is 'var is' rather than 'var is foo'. My suspect is I did not set the file path right in 'include'. So in file2.php, how should I get the actual absolute path it really gets for file1.php? Is it stored

Re: [PHP] how to get the absolute path of an included file?

2006-04-27 Thread Martin Alterisio
2006/4/27, Bing Du [EMAIL PROTECTED]: Hello, Here are the two scripts. The result is 'var is' rather than 'var is foo'. My suspect is I did not set the file path right in 'include'. So in file2.php, how should I get the actual absolute path it really gets for file1.php? Is it stored in