警告我跑在MAMP一個函數phpinfo(),並獲得了以下警告,嵌入在php信息表:的phpinfo顯示date.timezone在MAMP
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 case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EST/-5.0/no DST' instead in /Applications/MAMP/bin/mamp/phpinfo.php on line 2
在php.ini的date.timezone文件被設置爲'America/New_York',並且警告僅比phpinfo表中反映的實際設置高三行!
有人請向我解釋如何解決這個問題?
檢查你的php.ini的路徑,有時,你使用php.ini中是不一樣的,如果它是在CLI或網絡。 – artragis
謝謝@artragis!我在哪裏可以找到MAMP實際使用的php.ini的路徑? –
在cli中你可以使用php --ini,在web上使用phpinfo()函數,它會說你。 – artragis