note 112660 added to function.autoload
| From: | eragroove at gmail dot com | Date: | Wed, 10 Jul 2013 05:48:23 +0000 |
| Subject: | note 112660 added to function.autoload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195554@lists.php.net to get a copy of this message | ||
If you can keep file name and class name as same, it will be good programming practice. It helps to
__autoload function to load file without checking any condition.
function __autoload($class){
require_once( $class.".php");
}
----
Server IP: 69.147.83.199
Probable Submitter: 175.157.150.31
----
Manual Page -- http://php.net/manual/en/function.autoload.php
Edit -- https://master.php.net/note/edit/112660
Del: integrated -- https://master.php.net/note/delete/112660/integrated
Del: useless -- https://master.php.net/note/delete/112660/useless
Del: bad code -- https://master.php.net/note/delete/112660/bad+code
Del: spam -- https://master.php.net/note/delete/112660/spam
Del: non-english -- https://master.php.net/note/delete/112660/non-english
Del: in docs -- https://master.php.net/note/delete/112660/in+docs
Del: other reasons-- https://master.php.net/note/delete/112660
Reject -- https://master.php.net/note/reject/112660
Search -- https://master.php.net/manage/user-notes.php