php默认错误日志路径:C:\Windows\Temp\php-errors.log,经常看看,能帮你发现很多潜在的问题,可能这些问题并不影响正常运行。
错误描述:
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!
另外,还有下面两种办法(不建议)
1、在页头使用date_default_timezone_set()设置 date_default_timezone_set('PRC'); //东八时区 echo date('Y-m-d H:i:s');
2、在页头使用 ini_set('date.timezone','Asia/Shanghai');
对于中国,可选值:Asia/Chongqing ,Asia/Shanghai ,Asia/Urumqi (依次为重庆,上海,乌鲁木齐)港台地区可用:Asia/Macao ,Asia/Hong_Kong ,Asia/Taipei (依次为澳门,香港,台北),还有新加坡:Asia/Singapore,老的PRC也行。
PHP所支持的时区列表可参见:http://www.php.net/manual/zh/timezones.php
分享到:
相关推荐
Warning: phpinfo() [function.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 ...
PHP Warning: date(): 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...
本文实例讲述了PHP提示Warning:phpinfo() has been disabled函数禁用的解决方法。...在运行phpinfo时碰到提示如下:PHP Warning: phpinfo() has been disabled for security reasons in XX.php on line XX
(nts/ts)是否线程线程:phpinfo::Thread Safety : enable / disable (x86/x64)是否32位:phpinfo::Architecture x86/x64 32/64 vc版本:phpinfo:Compiler MSVC11 请检查vc版本是否一致,找到对应的igbinary和...
phpinfo.php
phpinfo
mailtest.php - a PHP script to test that the mail() function is working on your server index.html - a HTML file that you can use to redirect to index.php if your server does not user index.php ...
要用到 SoapClient, new 了一个提示 Class ‘SoapClient’ not found, 检查了下 phpinfo, 原因是当初没有编译这个扩展, 只好现在再加上了。 php在调用webservice时,报告如下类似错误: ( ! ) Fatal error: Class ...
加密 ioncube,Using ionCube encoded and secured PHP files requires ... The Windows non-TS Loaders are for use on a Windows system where a phpinfo page shows that PHP is built with thread safety disabled.
一个很经典的PHPINFO,单个tag不多于12个字符,多个关键字请用空格分隔,最多填写5个。点击右侧我的Tag可快速添加
window下php5.5 Thread Safe (TS) x86 的mongo扩展 1.下载完你需要的二进制包后,解压压缩包,将'php_mongo.dll'文件添加到你的PHP扩展目录中(ext)。ext目录通常在PHP安装目录下的ext目录。 2.打开php配置文件 ...
Python 版本的 phpinfo()
just simple php info
phpinfo ok
我们配置php环境的时候往往都会写phpinfo();这个函数来测试php环境是否安装成功,但往往这个函数也会给系统带来安全隐患,那么如何让关掉这个函数呢?下面介绍一种方法:修改php.ini... This directive is *NOT* af
name and the name of a shared object file to load it from". 编写的php文件必须放在Apache2\htdocs文件夹下。 3.要修改的文件及内容: (1)D:\program files\php-5.0.0RC3-Win32下的php.ini-dist 文件 改名为...
无法查询到php信息。 环境:linux版本CentOS Linux release 7.3.1611 (Core),nginx使用tengine。php和tengine均为源码安装到/usr/local。 首先确认tengine已经启动,在网站根目录下写了个静态测试网页,测试没问题...
phpinfo()中关于mssql配置的截图
8+ 安装说明从终端运行的项目根文件夹中: composer require jeremykenedy/laravel-phpinfo 注册包Laravel 5.5 及更高版本使用包自动发现功能,无需编辑config/app.php文件。 Laravel 5.4 及以下在config/app.php ...