日志里面没报错 页面却打开错误500 怎么找出错在哪里呢
程序在本地能正常运行上传到了服务器
能打开的页面日志是
<?phpif ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
DEBUG - 2014-10-03 16:00:24 --> Config Class Initialized
DEBUG - 2014-10-03 16:00:24 --> Hooks Class Initialized
DEBUG - 2014-10-03 16:00:24 --> Utf8 Class Initialized
DEBUG - 2014-10-03 16:00:24 --> UTF-8 Support Enabled
DEBUG - 2014-10-03 16:00:24 --> URI Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Router Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Output Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Security Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Input Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Global POST and COOKIE data sanitized
DEBUG - 2014-10-03 16:00:25 --> Language Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Loader Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Controller Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Helper loaded: url_helper
DEBUG - 2014-10-03 16:00:25 --> Helper loaded: file_helper
DEBUG - 2014-10-03 16:00:25 --> Model Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Model Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Database Driver Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Model Class Initialized
DEBUG - 2014-10-03 16:00:25 --> Pagination Class Initialized
DEBUG - 2014-10-03 16:00:25 --> File loaded: application/views/admin/category_index.php
DEBUG - 2014-10-03 16:00:25 --> File loaded: application/views/admin/sys_entry.php
DEBUG - 2014-10-03 16:00:25 --> Final output sent to browser
DEBUG - 2014-10-03 16:00:25 --> Total execution time: 0.2585
DEBUG - 2014-10-03 16:00:26 --> Config Class Initialized
DEBUG - 2014-10-03 16:00:26 --> Hooks Class Initialized
DEBUG - 2014-10-03 16:00:26 --> Utf8 Class Initialized
DEBUG - 2014-10-03 16:00:26 --> UTF-8 Support Enabled
DEBUG - 2014-10-03 16:00:26 --> URI Class Initialized
DEBUG - 2014-10-03 16:00:26 --> Router Class Initialized
不能打开错误没提示 页面500内部错误的日志是
<?phpif ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
DEBUG - 2014-10-03 16:03:50 --> Config Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Hooks Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Utf8 Class Initialized
DEBUG - 2014-10-03 16:03:50 --> UTF-8 Support Enabled
DEBUG - 2014-10-03 16:03:50 --> URI Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Router Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Output Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Security Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Input Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Global POST and COOKIE data sanitized
DEBUG - 2014-10-03 16:03:50 --> Language Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Loader Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Controller Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Helper loaded: url_helper
DEBUG - 2014-10-03 16:03:50 --> Model Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Model Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Database Driver Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Helper loaded: file_helper
DEBUG - 2014-10-03 16:03:50 --> Model Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Config Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Hooks Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Utf8 Class Initialized
DEBUG - 2014-10-03 16:03:50 --> UTF-8 Support Enabled
DEBUG - 2014-10-03 16:03:50 --> URI Class Initialized
DEBUG - 2014-10-03 16:03:50 --> Router Class Initialized
请问前辈们能帮我从这个日志对比找出出错页面打不开的原因吗
不然错误500 你们一般是怎么排除找出bug的呢?
找到原因了
public function get_list($tid = 0,$limit = 0,$offset = 0)
{
if(empty(intval($tid))){
return false;
}
if(empty(intval($limit))){
return false;
}
上面两个变量判断改成下面代码就运行正常了
if(!ctype_digit($tid))return false;
if(!ctype_digit($limit))return false;
这个写法日志和页面都没报错 我就想不通是php语法问题还是ci的问题
页:
[1]