note 97862 added to language.oop5.autoload
| From: | DaWG at osu1 dot php dot net | Date: | Wed, 12 May 2010 16:21:14 +0000 |
| Subject: | note 97862 added to language.oop5.autoload | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-169190@lists.php.net to get a copy of this message | ||
Be careful with the use of file_exists, if there were a directory with the name ($classname .
"php") then file_exists would return true. (is_file "may" be preferred, YMMV).
<?php
if (is_file($className . '.php')) { ...
?>
----
Server IP: 69.147.83.197
Probable Submitter: 98.22.59.54
----
Manual Page -- http://www.php.net/manual/en/language.oop5.autoload.php
Edit -- https://master.php.net/note/edit/97862
Del: integrated -- https://master.php.net/note/delete/97862/integrated
Del: useless -- https://master.php.net/note/delete/97862/useless
Del: bad code -- https://master.php.net/note/delete/97862/bad+code
Del: spam -- https://master.php.net/note/delete/97862/spam
Del: non-english -- https://master.php.net/note/delete/97862/non-english
Del: in docs -- https://master.php.net/note/delete/97862/in+docs
Del: other reasons-- https://master.php.net/note/delete/97862
Reject -- https://master.php.net/note/reject/97862
Search -- https://master.php.net/manage/user-notes.php