Easy Question - In 2 Much of A Rush it Figure it out
PHP Code:
$filename = $_SERVER['DOCUMENT_ROOT'] . '/includes/pages/whatsnew.txt';
$fp = fopen($filename, "w+");
$write = fputs($fp, $file);
fclose($fp);
Error:
Quote:
Warning: fopen(/home/groups/htdocs/includes/pages/whatsnew.txt): failed to open stream: Read-only file system in /home/groups/htdocs/admin/1.php on line 4.
I set the file and the directory to 777, so why is it still b1tchin?
Re: Easy Question - In 2 Much of A Rush it Figure it out
The clue is in the error message:
Quote:
Warning: fopen(/home/groups/htdocs/includes/pages/whatsnew.txt): failed to open stream: Read-only file system in /home/groups/htdocs/admin/1.php on line 4.
You cannot open the file for writing because it resides on a read only file system.
Re: Easy Question - In 2 Much of A Rush it Figure it out
So changing the directory properties won't do any thing? So theres nothing I can do? :(
Re: Easy Question - In 2 Much of A Rush it Figure it out
If you have permissions then you can unmount the file system and remount it as a read/write file system. If not, the only thing you can do is use a file system which is not read only.
Re: Easy Question - In 2 Much of A Rush it Figure it out
:( :cry: Well there goes my whole site design out the window...
Re: Easy Question - In 2 Much of A Rush it Figure it out
Why not place the file somewhere else? :ehh:
Re: Easy Question - In 2 Much of A Rush it Figure it out
You mean a different server? Here's what I'm trying to do...
I'm making a cms for my site on sourceforge. The html for the different sections are asaved in text files and then echoed in through PHP. When admins need to edit the content, the text file is loaded into a textarea (textbox), edited and then overwrites the file. But I guess the security on SF doesn't allow writting to files at all.
I guess I will just have to use SQL :shrugs: