This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11788|Reply: 2

php test code phpinfo() gives the following error:

[Copy link]
Posted on 2/3/2015 10:35:40 AM | | |
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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in E:\phptest\test.php on line 2




Previous:php-cgi.exe - The FastCGI process quits unexpectedly
Next:PHP Warning: phpinfo(): It is not safe to rely on the system's timezone setting
 Landlord| Posted on 2/3/2015 10:47:59 AM |
PHP warning: phpinfo(): Relying on the system's time zone setting is unsafe. You *need* to use the date.timezone setting or the date_default_timezone_set() function. If you've used these methods, you're still getting warnings like this that you're most likely to misspell the time zone identifier. We select the time zone of UTC now, but please select your time zone to set date.timezone. E:\\test.php phptest 2 lines
 Landlord| Posted on 2/3/2015 10:48:43 AM |
Solution:
First: date.timezone = "Asia/Shanghai"
Second: Add date_default_timezone_set ('Asia/Shanghai') to the php file where the error message appears; The location is in Shanghai, China
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com