|
-
Oct 10th, 2005, 02:43 PM
#1
Thread Starter
Hyperactive Member
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:
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?
-
Oct 10th, 2005, 05:02 PM
#2
Re: Easy Question - In 2 Much of A Rush it Figure it out
The clue is in the error message:
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.
-
Oct 10th, 2005, 10:19 PM
#3
Thread Starter
Hyperactive Member
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?
-
Oct 11th, 2005, 12:03 AM
#4
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.
-
Oct 11th, 2005, 06:46 AM
#5
Thread Starter
Hyperactive Member
Re: Easy Question - In 2 Much of A Rush it Figure it out
Well there goes my whole site design out the window...
-
Oct 11th, 2005, 06:52 AM
#6
Re: Easy Question - In 2 Much of A Rush it Figure it out
Why not place the file somewhere else?
-
Oct 11th, 2005, 08:18 AM
#7
Thread Starter
Hyperactive Member
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:
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|