PHP message board native MVC Architecture + MONGODB Database

Source: Internet
Author: User
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 ();

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.