reksss
April 18, 2011, 5:50am
1
Hello…
Below i have listed some codes. It is working well in putty but not in browser(IE, google chrome).
<?php
//OPENING the input FILE
//**********************
$fp = @fopen (“sample.txt”,‘w’) or die(“Could not open sample.txt file”);
fwrite($fp,"Testing
");
fclose($fp);
?>
<HTML>
File open testing
</HTML>
Anybody will help me to fix this problem?
Thanks in Advance…
Rose
Zurev
April 18, 2011, 6:03am
2
What happens when you try opening it from a browser?
Also, try not to use error suppression when debugging/developing.
reksss
April 18, 2011, 6:08am
3
Im getting Could not open sample.txt file message.
The new file was not created…
It sounds like a permissions problem. I forget now about the best-practice techniques that relate to file/folder permissions and publicly accessible web pages.
reksss
April 18, 2011, 7:18am
5
oh… Plz help me to solve this prob…
Check your web-server logs for errors.
Check directories permissions and change it with chmod, chown command if necessar
reksss
April 20, 2011, 1:19am
7
I changed the file permission and now its working…
Thanks alot for ur help…