参考《Pro PHP》
简单实现了一个mvc框架。
自动加载的问题
<?php function __autoload($class) { if(file_exists($class.".php")) { require_once($class.".php"); } } class autoload{ public static function load($class) { if(file_exists("class/".$class.".php")) { require_once("class/".$class.".php"); } } } spl_autoload_register("autoload::load"); spl_autoload_register("__autoload"); $a = new bb(); $c = new ee(); show_source("c14.php"); ?>