There is a way to use CLASS_EXISTS and __autoload without CRASH the script?

Test[Form]

New Member
Example:ClassName.php\[code\]<?php echo "This will crash all"; ?>\[/code\]In another file...\[code\]foreach ($FILENAMES_WITHOUT_DOT_PHP as $name => $value) { if (class_exists( $value )) { echo "ClassName exists..."; } else { echo "ClassName doesn't exists...."; }}\[/code\]The output of this code is: This will crash allInstead of this:ClassName doesn't exists....Autoload function:\[code\]function __autoload( $var_class ){ require_once( "$var_class.php") ;}\[/code\]
 
Back
Top