Quick file read question
Posted: Wed Apr 30, 2008 9:27 pm
This seems very simple to me, but i can't figure out what is wrong. I had some (working) code that looked like so:
Where the text file was outside of the web directory (security). I am changing my site structure so this PHP file is now one level lower in the web directory. I changed the code accordingly:
But now I receive the following error:
fopen(./../../file.txt) [function.fopen]: failed to open stream: No such file or directory
Does anyone know the reason for this?
Thanks!
Code: Select all
$filen="./../file.txt";
$fh=fopen($filen,"r");
...Code: Select all
$filen="./../../file.txt";
$fh=fopen($filen,"r");
...fopen(./../../file.txt) [function.fopen]: failed to open stream: No such file or directory
Does anyone know the reason for this?
Thanks!