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

php 错误,在线等。

Warning: trigger_error() [function.trigger-error]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for '8.0/no DST' instead in D:\Program Files\Zend\Apache2\htdocs\project\library\smarty\Smarty.class.php on line 1093 Fatal error: Smarty error: [in D:\Program Files\Zend\Apache2\htdocs\project\application/modules/admin/views/scripts/index/index.tpl line 1]: syntax error: invalid attribute name: '../admintpl/head.tpl\' (Smarty_Compiler.class.php, line 1550) in D:\Program Files\Zend\Apache2\htdocs\project\library\smarty\Smarty.class.php on line 1093
答案:从错误信息提示来看,你处理时间的时候时区写错了,这个警告是说你的时区设置函数 date_default_timezone_set() 设定时区时出错了,因为你的参数不是一个正确的时区标示符,比如你用'8.0/no DST'写法按格林威治时间差8个小时来设定我们北京时区,但是如果你的php没有开启date.timezone=PRC这个的话是不行的,所以要用'UTC'来代替就可以了,详细可以参见:http://hi.zhaoxi.net/jscsshtmljsp/blog/item/006c8891f7031b5fd1135edc.html/cmtid/2b40fe0d76d2ec2b6a60fb40。
至于下面的smarty报错则是指出D:\Program Files\Zend\Apache2\htdocs\project\application/modules/admin/views/scripts/index/index.tpl line 1,第一行有smarty语法错误 无效的属性名:'../admintpl/head.tpl',可能是包含文件写错了之类的,这个需要进一步确认楼主的代码才能回答
其他:错误信息不是:Fatal error: Smarty error 无效的属性名“../admintpl/head.tpl\” 其中一个错误:没有设置时区。用date_default_timezone_set('PRC');可解决 

上一个:我这个网站是PHP编的,但前台不能跟新,报错都是数据库报错,所以想找个人帮我看下数据库,加Q283783400
下一个:php无法连接sql 2000,一直报错,文件都复制好了,php.ini也修改好了,就是死活连不上啊

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