Hello everyone, l'm trying to make a script that will create a new file (variable $new_url), and then write to it. But l'm having problems:
I've tried chmodding the actual pagemaker.php file at 755, didn't work.. tried it at 777, still didn't work. So l'm officially stuck. Here's the actually "write" function of my script:Code:Warning: fopen(/home/mylogin/public_html/testing.html): failed to open stream: Permission denied in /home/mylogin/public_html/pagemaker.php on line 81 Warning: fwrite(): supplied argument is not a valid stream resource in /home/mylogin/public_html/pagemaker.php on line 82 Warning: fclose(): supplied argument is not a valid stream resource in /home/mylogin/public_html/pagemaker.php on line 83
What can l do to get this script to work?PHP Code:$fstring = "this is getting written to my new page!";
$fp = fopen("/home/mylogin/public_html/$new_url", "w+");
$fout = fwrite($fp, $fstring);
fclose($fp);
Any help would be greatly appreciated!
~JSlime


LinkBack URL
About LinkBacks




Reply With Quote
Bookmarks