You are here: Re: Going With a Flat-File DB for a Simple Comment Form « PHP Programming Language « IT news, forums, messages
Re: Going With a Flat-File DB for a Simple Comment Form

Posted by Andy Jeffries on 05/11/06 14:03

On Thu, 11 May 2006 11:02:38 +0000, Andy Jeffries wrote:
> On Wed, 10 May 2006 14:48:43 -0700, squash wrote:
>> sure you can use a flatfile. just pick a good delimeter to seperate the
>> names and comments. Then read in the file using file () and split each
>> line into an array using preg_split ( '/delimeter'/ ... then write out
>> the comments. forget mysql for such a simple thing.
>
> or use explode("delimited", $string) which will be quicker than
> preg_split.

And wouldn't have the downsides of having to ensure you avoid regular
expression special characters (for example, not that you would, but you'd
have an issue if you picked . as your separator).

Cheers,


Andy

--
Andy Jeffries MBCS CITP ZCE | gPHPEdit Lead Developer
http://www.gphpedit.org | PHP editor for Gnome 2
http://www.andyjeffries.co.uk | Personal site and photos

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация