Home >Backend Development >PHP Tutorial >PHP 设置:timezone、error_log

PHP 设置:timezone、error_log

WBOY
WBOYOriginal
2016-06-23 14:33:22936browse

PHP timezone

服务器建议使用UTC 0区,且无夏时令,即Atlantic/Reykjavik。如果在个人PC上开发,建议也使用0区,与服务器一致。

sudo vi /usr/local/php/lib/php.inidate.timezone = Atlantic/Reykjavik
PHP error

开发环境显示notice,“警告即错误”,要保证代码是0 notice 0 warning。

sudo vi /usr/local/php/lib/php.inidisplay_errors = Onerror_reporting = E_ALL | E_STRICT

生产环境不显示错误。

sudo vi /usr/local/php/lib/php.inidisplay_errors = Off
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Windows 下 Nginx + PHP 配置Next article:安装配置php