11-09-2007, 07:45 PM
|
#16 (permalink)
|
|
The Prestige
Join Date: Oct 2007
Location: Manchester, UK
Posts: 836
Thanks: 31
|
ah i think i get what ur saying (finally i didnt find a fish but managed to find a source of caffine)
yes you could include it like:
PHP Code:
include_once('database.php'); $db = new database();
or if your class name is exactly the same as its file name you could use the magic __autoload method:
PHP Code:
function __autoload($class) { include_once($class . '.php'); }
so it automaticly includes any file it needs.
i hope that helps :)
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
|
|
|
|