For the original PHPMVC architecture, install mongodbMongoDB *** portal file ** @ version $ Id: index in advance. php2014-3-12 afternoon 2: 27: 11 zhangzw $ * load path $ dirpatharray (get_include_path (), class, model, config); set_include_path (implode (PATH_SEPARATOR,
For the original PHPMVC architecture, you must install the mongodb/*** portal file ** @ version $ Id: index in advance. php 2:27:11 zhangzw $ * // loading path $ dirpath = array (get_include_path (), 'class', 'model', 'config'); set_include_path (implode (PATH_SEPARATOR,
The original php mvc Architecture requires the early installation of mongodb
/*** Portal file ** @ version $ Id: index. php 2:27:11 zhangzw $ * // loading path $ dirpath = array (get_include_path (), 'class', 'model', 'config'); set_include_path (implode (PATH_SEPARATOR, $ dirpath); // automatically load the calling class ClassLoader {/*** load class name * @ param string $ class_name */public static function class_loader ($ class_name) {$ class_name = strtolower ($ class_name); $ search = 'cls'; if (strpos ($ class_name, $ search)> 0) {$ file = str_replace ($ search, '', $ class_name ). '_'. $ search. '. php '; require_once $ file ;}/ *** load model class * @ param string $ model_name */public static function model_loader ($ model_name) {if (strpos (strtolower ($ model_name), 'model')> 0) {$ file = 'model _'. strtolower ($ model_name ). '. php '; require_once $ file ;}}// load the class file spl_autoload_register (array ('classloader', 'class _ loader ')); // load the model file spl_autoload_register (array ('classloader ', 'model _ loader'); // initialize $ core = CoreCls: instance ();