You are here: Re: set values once « PHP Programming Language « IT news, forums, messages
Re: set values once

Posted by Colin McKinnon on 09/30/05 11:38

julian_m wrote:

> let say that i want to allow someone (the site admin maybe) to chose
> certain configuration values, for instance
<snip>
>
> I could keep this info in the database, but i should read it every time
> a page is rendered... (open connection, query, close conn)
>

So put it in a file then (although it's not *that* much of an overhead using
the DB):

file_put_contents($config_file, serialize($options));

and

$options=unserialize(file_get_contents($config_file));

C.

 

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

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