求助求助。CI2.1中使用base_url()函数时出错
CI中使用base_url()函数时报如下错误:A PHP Error was encountered
Severity: Warning
Message:main(): It is not safeto rely on the system's timezone settings. You are *required* to usethe date.timezone setting or the date_default_timezone_set() function.In case you used any of those methods and you are still getting thiswarning, you most likely misspelled the timezone identifier. We selected'UTC' for '8.0/no DST' instead
Filename: views/welcome_message.php
Line Number: 12
在config.php中设置了时区为:
date_default_timezone_set("PRC");
它就不报错了,但是就不显示内容了,但是它是有错误的:
http://bbs.php100.com/attachment/Mon_1206/50_216800_35606187bce9825.png?31
各位大大,知道什么原因吗?
补充:只要有设置时区,PHP错误就不会被打印出来。。。 使用base_url()时看看是否需要加载url helper 会这样吗?有代码才有真相 huboo82 发表于 2012-6-29 12:01 static/image/common/back.gif
使用base_url()时看看是否需要加载url helper
谢谢,使用这个确实要加载。url helper 普林 发表于 2012-6-29 16:39 static/image/common/back.gif
谢谢,使用这个确实要加载。url helper
那也不是报这个错吧 php 3.8以上版本会要求设置时区 huboo82 发表于 2012-6-29 17:40 static/image/common/back.gif
php 3.8以上版本会要求设置时区
LZ使用CI时报的这个错跟PHP是否设置时区有什么必然的联系吗?
求解 浪迹天涯 发表于 2012-6-29 23:31 static/image/common/back.gif
LZ使用CI时报的这个错跟PHP是否设置时区有什么必然的联系吗?
求解
只要有设置时区(在config.php或index.php页面),PHP错误就不会被打印出来,只显示一个空白页面。 时区设置最好在php.ini里设置
本地开发环境把PHP的错误报告打开
error_reporting = E_ALL
CI的入口文件index.php 设置
define('ENVIRONMENT', 'development');
你最好先检查下你的本地PHP环境先
页:
[1]