我的PHP知识是有限的,我试图将http://www.tutorialchip.com/php-download-file-script/这个脚本实现到我的网站。我已经在这里推出了他们的文件http://brooksmemories.com/test/。如果点击一个文件,我得到了以下错误用PHP强制下载文件
Strict Standards: main() [function.main]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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/Chicago' for 'CDT/-5.0/DST' instead in /home/inspire/public_html/brooksmemories.com/test/download.php on line 16
Notice: Use of undefined constant __DIR__ - assumed '__DIR__' in /home/inspire/public_html/brooksmemories.com/test/download.php on line 16
我不知道如何纠正这些错误得到它的工作。任何帮助将不胜感激。谢谢。
PHP中不存在'__DIR__'常量<= 5.2;在其位置使用'dirname(__ FILE __)'。时区警告[由Google解释](http://www.google.de/search?q=Strict+Standards:+main()+%5Bfunction.main%5D:+ It + is + not + safe +到+靠+上+的+系统+时区+设置。+请+使用+的+ date.timezone +设置+的+ TZ +环境+变量+或+的+ date_default_timezone_set()+功能)。 – mario 2012-04-27 17:32:39
@mario:据我所知,时区警告是由此通知引起的。出于某种原因,即使错误也会导致PHP中的错误。奇怪,但这是它的工作原理。我会修改配置,所以这个警告不会发生,但在这种情况下,它根本就没有任何意义。 – xfix 2012-04-27 17:36:19