江苏分销网站建设,小说网站建设方案,wordpress post存储,it外包行业1、实现效果通过config设置开关debug调试模式 2、debug调试模式设置和时区设置
error_reporting和display_errors点击查看详细讲解 public static function run(){//定义常量self::_set_const();//创建模块目录self::_mk_module();//加载文件self::_import_file();self::_set_…1、实现效果通过config设置开关debug调试模式 2、debug调试模式设置和时区设置
error_reporting和display_errors点击查看详细讲解 public static function run(){//定义常量self::_set_const();//创建模块目录self::_mk_module();//加载文件self::_import_file();self::_set_system();//类自动加载spl_autoload_register(array(__CLASS__,_autoload));//运行框架self::_run();}//设置调试模式debugprivate static function _set_system(){if(config(DEBUG)){error_reporting(E_ALL);ini_set(display_errors, On);}else{error_reporting(0);ini_set(display_errors, Off);}date_default_timezone_set(config(DEFAYLT_TIME_ZONE));}
3、config.php设置开启调试模式和时区
?php
return [DB_HOSTlocalhost,//数据库地址DB_DATABASEtest,//数据库DB_USERroot,//数据库账号DB_PWDroot,//数据库密码DEBUGfalse,//调试模式DEFAYLT_TIME_ZONEPRC,//设置时区];