note 114015 added to language.oop5.autoload

From: Date: Tue, 31 Dec 2013 14:46:53 +0000
Subject: note 114015 added to language.oop5.autoload
Groups: php.notes 
Request: Send a blank email to php-notes+get-198057@lists.php.net to get a copy of this message
Just a small autoload class (that works if you use corretly names, namespaces, uses and so on) found elsewhere with a small modification for linux: <?php //from http://www.phpfreaks.com / tutorial / oo - php - part - 1 - oop - in - full - effect function __autoload($className) { var_dump($className); $file = str_replace('\\', DIRECTORY_SEPARATOR, $className) . '.php'; var_dump($file); var_dump(file_exists($file)); if (!file_exists($file)) { return false; } else { require $file; return true; } } ?> ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/language.oop5.autoload.php Edit -- https://master.php.net/note/edit/114015 Del: integrated -- https://master.php.net/note/delete/114015/integrated Del: useless -- https://master.php.net/note/delete/114015/useless Del: bad code -- https://master.php.net/note/delete/114015/bad+code Del: spam -- https://master.php.net/note/delete/114015/spam Del: non-english -- https://master.php.net/note/delete/114015/non-english Del: in docs -- https://master.php.net/note/delete/114015/in+docs Del: other reasons-- https://master.php.net/note/delete/114015 Reject -- https://master.php.net/note/reject/114015 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#198057) next »