« Return to Thread: Sessions

Re: Sessions

by Richard Heyes-4 :: Rate this Message:

Reply to Author | View in Thread

Hi,

> ..

This is precisely what I do, albeit my file is called config.php, and
not init.php. Not that it makes a jot of difference. This file is used
to setup the environment, so that way everything I commonly need is
available simply by including one file. One thing to note though is
that a database connection is not established by default. I used to
get a lot of comment spam on my blog and because it was needlessly
connecting to the database, it was bringing down the server. So now I
simply use something like this to quickly and easily get a reference
to a database object:

$db = getDatabase();

Wunderbar.

--
Richard Heyes
HTML5 graphing: RGraph (www.rgraph.net - updated 3rd July)

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

 « Return to Thread: Sessions