?

Search Help Board

PHP FAQ
PHP Articles
PHP Help
Bulletin Board

PHP Manual (NEW!)
First Time PHP'ers
Help with programming
Sql assignment help
PHP Homework Help


C# Help

?
?Re: Easy newb fwrite question.
Author:??(---.bluecom.no)
Date:???07-15-03 03:11

1. If your site is hosted on a Linux server make sure that you have set the CHMOD to 777 on the news.txt file

2. You need to read the file into your script... have a look at the fread() function in the php manual

3. Replace all your fwrite functions with one, like this:
fwrite($fp, $date."~".$message."\n");

If you have access to a sql database, it would be smart to use it... that way you don't have to lower the security of the site by setting the CHMOD to 777

If you don't have access to a Database, have a look at FlatFile, you still have to change the CHMOD, but you get a lot of sql functions... so that you don't have to delete old news - just make the it retrive the lates new!

Read more on the FlatFile homepage:
http://ffdb-php.sourceforge.net/

Good luck!

?Topics Author? Date
?Easy newb fwrite question.??new
Dan 07-14-03 15:54?
?Re: Easy newb fwrite question.??new
? 07-15-03 03:11?
Go to Top??|??Go to Topic??|??Flat View??|??Search?
??|??
New Topic
?Reply To This Message
?Your Name:
?Your Email:
?Subject:
Email replies to this thread, to the address above.
??wrote: > > 1. If your site is hosted on a Linux server make sure that > you have set the CHMOD to 777 on the news.txt file > > 2. You need to read the file into your script... have a look > at the fread() function in the php manual > > 3. Replace all your fwrite functions with one, like this: > fwrite($fp, $date."~".$message."\n"); > > If you have access to a sql database, it would be smart to > use it... that way you don't have to lower the security of > the site by setting the CHMOD to 777 > > If you don't have access to a Database, have a look at > FlatFile, you still have to change the CHMOD, but you get a > lot of sql functions... so that you don't have to delete old > news - just make the it retrive the lates new! > > Read more on the FlatFile homepage: > http://ffdb-php.sourceforge.net/ > > Good luck! ">??

Provided By
Phorum