This seems very simple to me, but i can't figure out what is wrong. I had some (working) code that looked like so:
Code: Select all
$filen="./../file.txt";
$fh=fopen($filen,"r");
...
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:
Code: Select all
$filen="./../../file.txt";
$fh=fopen($filen,"r");
...
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!