Hi there
I have 2 scripts:
?php
/*
test1.php
*/
function called_from_file(){
print __FILE__
}
?
///
?php
/*
test2.php
*/
include(test1.php);
called_from_file();
?
/
I get the output
test1.php
Hi there,
I have 3 files in nested subdirectories
(1) /test.php
(2) /subdir1/test.php
(3) /subdir1/subdir2/test.php
(1) contains
//
?php
print hello;
?
(2) and (3) contains
/
?php
include(../test.php);
?
if I call (3) it loops forever in (2) trying to
Hi there again people,
I looks like this thread turned into a 'include' usage
discussion. Well, nothing wrong with that.
The conclusion seems to be that ALL level of nested
included inherit current directory reference for
relative paths from the very first script ( that in
$_SERVER[SCRIPT_NAME]
3 matches
Mail list logo