PHP - Can Someone Please Help Me With Few Definition
if(isset($_GET[source])) {
highlight_file(__FILE__); }else{ what does this mean. i know its something to do with file.. Similar TutorialsI have this as my autoloader. All the classes are based off of Class O. I wanted to be able to do something like $dog = new Dog(); even if I hadn't yet created Dog.class.php and made it extend O. (I realize there are plenty of reasons this is a bad idea, this is a temporary part of the project, I am just trying to get a few things set up and thought it would work - now I'm probably going to spend more time trying to do this than it would have saved, but I'm curious. ) ( ! ) Parse error: syntax error, unexpected T_VARIABLE, expecting T_STRING in C:\wamp\www\project\index.php on line 22 (line 22 is Class $class_name extends O{ Code: [Select] <?php function autoload($class_name) { if(file_exists($class_name.'.class.php')){ require_once($class_name.'.class.php'); }else{ Class $class_name extends O{ } } } ?> Is it possible to do what I'm trying to do? |