Hi,
I have a file say "a.php" which reads some data from a remote site and saves it to the server in the same folder as itself say as data.txt
when im opening the file to write
$fp=fopen($tpath, 'w');
i use the fully qualified path using
$repl= substr(FILE,strrpos(FILE,"/")+1) ;
$tpath=FILE;
$tpath=str_replace($repl,"data.txt",$tpath);
Now i have another file say b.php into which i include a.php
using include("a.php");
When i run a.php on its won it works fine, but when i run b.php though it finds the proper path i get a permission denied error...
Warning: fopen(/home/bestones/public_html/new/test/data.txt): failed to open stream: Permission denied in /home/bestones/public_html/new/test/a.php on line 238
Any ideas as to what im doing wrong?
both a.php and b.php are chmod 755 and the server has safe mode turned off..
Thanks
T