|
Posted by AlexVN on 12/18/45 11:50
FP wrote:
> I also have files;
> \D.php
> \F1\E.php
> \F1\F1_1\F.php
>
> File D has the lines "echo 'D'"
> File E has the lines "echo 'E'; include_once('../D.php');"
> File F has the line "echo 'F'; include_once('../E.php');"
>
> If I open file E in my browser I get "ED".
> If I open file F in my browser I get "FE" and an error saying file D
> doesn't exist.
Please check the PHP manual on include function:
"If filename begins with ./ or ../, it is looked only in include_path
relative to the current working directory."
Please use the http://www.php.net/getcwd in your D,E,F scripts to check
what is current directory. I suspect that when the E.php is evaulated
in context of E.php, the working directory is still \F1\F1_1 so the
include_once('../D.php'); is trying to include \F1\F1_1\..\D.php, which
is does not exist.
Sincerely,
Alexander
http://www.alexatnet.com
Navigation:
[Reply to this message]
|