自己写了个phpMVC框架,用框架写了一个小的项目
原创php MVC框架 CGFramework,写的一个项目
百度云盘下载地址:http://pan.baidu.com/s/1o6r1Ney git:https://github.com/Naruone/CGFramework/ oschina git:https://git.oschina.net/naurone/CGFramework 作者:Corey QQ: 675608549
欢迎联系交流
- <?php
- /**
- * 入口文件
- * @author CG;
- */
- error_reporting(E_ALL);
- header(‘Content-type: text/html; charset=utf-8’);
- date_default_timezone_set(‘Asia/Shanghai’);
-
- define(‘__ROOT__’, dirname(__DIR__)); //定义网站根目录
- define(‘SITE_URL’, dirname($_SERVER[‘SCRIPT_NAME’])); //定义访问地址
-
- chdir(dirname(__DIR__));
-
- require ‘init_autoloader.php’;
-
- /* 调试阶段请注释以下三行 */
- if(file_exists(__ROOT__ . ‘/cache/complie.php’)){
- require __ROOT__ . ‘/cache/complie.php’;
- }
- /* ——↑——*/
-
- try {
- vendor\Application::init(require_once ‘./config/config.ini.php’)->run();
- } catch (Exception $e) {
- echo “
程序异常信息:” . $e->getMessage() . ‘ ‘;
- echo ‘出错文件:’, $e->getFile(), ‘
‘;
- echo ‘错误行数:’, $e->getLine(), ‘
‘;
- echo ‘
出错代码: ' . $e->getTraceAsString();
- die;
- }
-
-
- /* 调试阶段请注释以下四行 */
- if(!file_exists(__ROOT__ . '/cache/complie.php')){
- /*生成合并库文件*/
- vendor\cache\GenerateVendor::get_creater()->complie();
- }
- /* ------↑------*/
复制代码 |
喜欢
(0)
打赏
- 支付宝扫一扫
- 微信扫一扫
Warning: include(/www/wwwroot/fengjinwei.com/wp-content/themes/fj/relatepost.php): failed to open stream: No such file or directory in
/www/wwwroot/fengjinwei.com/wp-content/themes/fj/single.php on line
97
Warning: include(): Failed opening '/www/wwwroot/fengjinwei.com/wp-content/themes/fj/relatepost.php' for inclusion (include_path='.:') in
/www/wwwroot/fengjinwei.com/wp-content/themes/fj/single.php on line
97
最新评论