here we go, a simple, very basic class to manage DB connections; I know there are so many around BUT
it’s very lightweight because it:
makes use of the “singleton” pattern, so you can start make a mess with patterns [if you've never do so]
ther’s soo much room for improvement
since I use it on an almost everyday [...]
don’t know if you already use this
function __autoload($class){
# autoloading of a class #
if (file_exists(”classes/class.”.$class.”.php”))
include_once(”classes/class.”.$class.”.php”);
else print “Failed to auto-load classes/class.{$class}.php”;
}
it’s a little snippet of PHP code who take care of autoloading a class when you try to use it and the relevant definition file hasn’t still been loaded.
As you can see, if you use a bit [...]
