note 103960 deleted from language.oop5.autoload by danbrown
| From: | danbrown@php.net | Date: | Fri, 13 May 2011 17:40:38 +0000 |
| Subject: | note 103960 deleted from language.oop5.autoload by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-179701@lists.php.net to get a copy of this message | ||
Note Submitter: bardecho
----
__autoload() works perfect for me:
<?php
function __autoload($name) {
require 'objects/'.strtolower($name).'.php';
}
$test=new Test(); //'test.php' will be loaded from folder objects
?>