TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Absolute Beginners (http://www.talkphp.com/absolute-beginners/)
-   -   Guestbook script does not use a db...? (http://www.talkphp.com/absolute-beginners/5081-guestbook-script-does-not-use-db.html)

Dave 11-02-2009 02:47 AM

Guestbook script does not use a db...?
 
I like to read simple scripts in hopes that I might accidentally learn something. I downloaded a one-file script entitled "guestbook.php. The notes said:

--> Doesn't use database. Writes all info to entries.php.

My question is, what might "entries.php" look like? Don't mean a long, involved description, just a quick thought.

Thanks!
Dave

Village Idiot 11-02-2009 04:43 AM

Quote:

Originally Posted by Dave (Post 29083)
I like to read simple scripts in hopes that I might accidentally learn something. I downloaded a one-file script entitled "guestbook.php. The notes said:

--> Doesn't use database. Writes all info to entries.php.

My question is, what might "entries.php" look like? Don't mean a long, involved description, just a quick thought.

Thanks!
Dave

Never directly write to a PHP file, or any other executable file for that matter. If you don't want to use a database, use a CSV file.

unitechy 11-02-2009 06:37 AM

It must be using a text file to save. I have been advised by great souls never to write to php file.

Izym 11-27-2009 11:45 PM

Yes, sLysdal, but only if no security precautions was taken by the developer at all. Anyway, one should at most be writing to config files in an installation script or so, nothing more.


All times are GMT. The time now is 02:19 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0