I have a php file in a directory called "photos" and I need to open another file called 0000000A.cgi for reading that is located in a directcory "/cgi-bin/Members" My code is trying to open a file in "photos/cgi-bin/Members/0000000A.cgi"
I get an error that says:
"Warning: file("/cgi-bin/Members/0000000A.cgi") - No such file or directory in /home/www/myserver/photos"
Here is my code:
$fpp=@fopen("$DOCUMENT_ROOT/cgi-bin/Members/$memberfile", "r");
(Memberfile = 0000000A.cgi)
I thought $DOCUMENT_ROOT would take me back to the root dir of my server (website), but it seems to be referencing the cgi-bin dir as a sub directory of the directory "photos" (where my calling php script is located). So, how do I reference the correct file off of my server root directory in my fopen command?
Thanks,
Basil