错误描述: 
PHP Warning:  phpinfo(): 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 C:\info.php on line 4

打开php.ini 配置文件 
找到 
[Date] 
; Defines the default timezone used by the date functions 
; http://php.net/date.timezone 
;date.timezone =

修改为: 
[Date] 
; Defines the default timezone used by the date functions 
; http://php.net/date.timezone 
date.timezone ="PRC"

一定要加引号否则还会报错!

然后记得重启apache!

PHP Warning: phpinfo(): It is not safe to rely on the system's timezone setting的更多相关文章

  1. phpinfo(): It is not safe to rely on the system's timezone settings

    PHP调试的时候出现了警告: 问题: Warning: phpinfo(): It is not safe to rely on the system's timezone settings. You ...

  2. Warning: strftime(): It is not safe to rely on the system's timezone settings.

    当运行程序时,会出现如下警告: Warning: strftime(): It is not safe to rely on the system's timezone settings. You a ...

  3. php : Warning: strftime(): It is not safe to rely on the system's timezone settings.

    使用 Smarty 的时候出现这种警告: Warning: strftime(): It is not safe to rely on the system's timezone settings. ...

  4. PHP Warning: date(): It is not safe to rely on the system's timezone settings.

    OSSEC安装结束后运行,运行以下命令却抛错 cat /opt/ossec/logs/alerts/alerts.log 具体抛错内容: ** Alert 1468897672.2164786: ma ...

  5. php时区设置 warning: strtotime(): It is not safe to rely on the system's timezone settings

    warning: strtotime(): It is not safe to rely on the system's timezone settings warning: strtotime(): ...

  6. PHP Warning: strftime(): It is not safe to rely on the system's timezone set

    当运行一些程序时,在httpd日志中会有如下警告日志: PHP Warning:  strftime(): It is not safe to rely on the system's timezon ...

  7. Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use ...报错

    错误截图 Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* t ...

  8. [服务器时区问题]PHP Warning: strftime(): It is not safe to rely on the system's timezone set

    PHP Warning: strftime(): It is not safe to rely on the system's timezone set 当运行一些程序时,在httpd日志中会有如下警 ...

  9. 出现Warning: date(): It is not safe to rely on the system's timezone settings的解决办法

    在没有配置,尤其是新安装的PHP中使用date函数时,会报这个错误: Warning: date(): It is not safe to rely on the system's timezone ...

随机推荐

  1. stack适配栈

    #include <stack> stack<int> s; s.empty() 如果栈为空,则返回 true,否则返回 stack s.size() 返回栈中元素的个数 s. ...

  2. Nokia N9开启开发者模式

    最近淘宝买个二手Nokia N9,纯粹是好奇meego系统. 到手了开始折腾,官方源早关闭了,导致无法开启开发者模式,没有权限很不方便.翻了翻dospy论坛的帖子,发现了n9repomirror_0. ...

  3. IOS单例模式(Singleton)

    IOS单例模式(Singleton)   单例模式的意思就是只有一个实例.单例模式确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例.这个类称为单例类. 1.单例模式的要点: 显然单例模 ...

  4. 自制单片机之十三……时钟IC_DS1302

    在网上看了很久,发现初学者最有兴趣的就是DS1302时钟电路,也很自然,它是个做出来就让你觉得最实用的电路了,但实际上制做上并不简单,首先你要让你的显示部分(不管是数码管还是LCD)调试通过.然后把D ...

  5. keil C语言与汇编语言混合编程

    C与汇编混合编程主要有以下几种:(1)C语言中嵌入汇编(2)无参数传递的函数调用(3)有参数传递的函数调用 一.C语言中嵌入汇编 1.在 C 文件中要嵌入汇编代码片以如下方式加入汇编代码: #prag ...

  6. 关于API的设计和需求抽象

    一,先来谈抽象吧,因为抽象跟后面的API的设计是息息相关的 有句话说的好(不知道谁说的了):计算机科学中的任何问题都可以抽象出一个中间层就解决了. 抽象是指在思维中对同类事物去除其现象的.次要的方面, ...

  7. BZOJ1108: [POI2007]天然气管道Gaz

    1108: [POI2007]天然气管道Gaz Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 410  Solved: 211[Submit][Sta ...

  8. NOI2015 小园丁与老司机

    http://uoj.ac/problem/132 这道题前2行的输出比较容易,就是简单的动态规划,然后第3行就是比较少见的有上下界的最小流. 前2行比较容易,我们讨论一下第3行的解法吧. 比如第1个 ...

  9. Erlang ODBC 处理中文

    erlang处理utf8字符集相对比较简单,因为它是用integer的list来保存所有的string的,所以处理什么字符集都没关系. 话虽这么说,但我在使用erlang的ODBC处理中文时,着实费了 ...

  10. testng跑失败用例重试

    testng 提高用例通过率,失败用例要重新运行一次 步骤: 1.新建一个Retry 类,implements IRetryAnalyzer接口,这个类里面确定重跑次数,以及分析每次失败是否需要重新运 ...