note 53851 deleted from language.oop5.autoload by felipe

From: Date: Mon, 24 Mar 2008 22:32:00 +0000
Subject: note 53851 deleted from language.oop5.autoload by felipe
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-137487@lists.php.net to get a copy of this message
Note Submitter: PrzemekG_ at poczta dot onet dot pl ---- This is a little more usefull code (modified from nhartkamp at eljakim dot N0SP4M dot nl) <?php function __autoload ($class_name) { $file = 'system/objects/' . $class_name . '.inc.php'; if (!file_exists ($file)) { return eval ("class $class_name {" . " function $class_name ($a=0, $b=0, $c=0, $d=0, $e=0, $f=0, $g=0, $h=0, $i=0) {" . " throw new Exception ();" . " }" . "}"); } require_once ($file); } ?> Adding some arguments to the constructor will prevent errors about argument count.

« previous php.notes (#137487) next »