Page 1 of 1

I can't open files on my server

Posted: Mon Oct 14, 2002 5:41 pm
by Azmerod
Here are the errors i get when i try to do a simple fopen. How do I get around this?


Warning: fopen("somefile.txt", "w") - Permission denied in /home3/sgdevel/public_html/screenshots/test.php on line 2

Warning: fclose(): supplied argument is not a valid File-Handle resource in /home3/sgdevel/public_html/screenshots/test.php on line 3

And here's the code I'm using

Code: Select all

<?php
$fp = fopen("somefile.txt", "w"); 
fclose($fp); 
?>
Simple enough but it doesn't seem to work. Any suggestions?

Posted: Mon Oct 14, 2002 5:49 pm
by volka
a search on "permission AND denied" revealed i.e. viewtopic.php?t=2821&highlight=permission+denied

and: welcome Image

Posted: Mon Oct 14, 2002 6:02 pm
by Azmerod
haha! It works. You guys are awesome. Thanks for your help