当前位置:编程学习 > php >>

求助求助。CI2.1中使用base_url()函数时出错

CI中使用base_url()函数时报如下错误:A PHP Error was encounteredSeverity: WarningMessage: 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' insteadFilename: views/welcome_message.phpLine Number: 12在config.php中设置了时区为:date_default_timezone_set("PRC");它就不报错了,但是就不显示内容了,但是它是有错误的:各位大大,知道什么原因吗?
答案:
时区设置最好在php.ini里设置本地开发环境把PHP的错误报告打开error_reporting = E_ALL CI的入口文件index.php 设置define('ENVIRONMENT', 'development');你最好先检查下你的本地PHP环境先
到CI中国社区网站查看回答详情>>
使用base_url()时看看是否需要加载url helper
到CI中国社区网站查看回答详情>>
补充:只要有设置时区,PHP错误就不会被打印出来。。。 
到CI中国社区网站查看回答详情>>

上一个:问一下,面向对象中 __get 和 __set 到底是干什么用的? - PHP进阶讨论
下一个:函数不知道怎么写,高手救命!!! - 技术问答

CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,