PHP的时区问题
装了PHP-5.3.0, 启动的时候总是会有
"[06-Aug-2009 13:27:31] PHP Warning: PHP Startup: 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 'Asia/Chongqing' for 'CST/8.0/no DST' instead in Unknown on line 0
在lib.ini中设置date.timezone = "Asia/Shanghai", 也没有什么用...
最后在shell中执行TZ='Asia/Shanghai'; export TZ , 重启php-fpm, 解决了..
相关文档:
<?php
//GB2312的Encode
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
/*重点了解strtotime()函数
1、strftime比time()好用,可以直接把常用的’2010-02-03‘转成时间戳。
2、date( ......
每个人都知道php.net,我们或早或晚的都会来到这里并不断的访问它。它是PHPer的主要参考网站,拥有大量有用的信息,但是这些信息却不是那么显而易见。
比较有用的官方PHP资源:
PHP官方函数手册下载: http://www.php.net/download-docs.php
包含最新的chm中文版本,HTML版本
中文函数手册:http://www.php.net/m ......
近来对php比较感兴趣,就断断续续的花了两个星期的时间把整个php开发需要用到的东西都装好了,大概的安装过程如下。
一、安装的软件:
Apache: 2.2.14
PHP:5.2.12
MySQL:5.1.42。
SVN:1.5.6
PHPMyAdmin:3.2.5
Zend Studio: 7.1
Zend Debugger: 5.1.14
二、安装过程:
1. 安装和配置apache
安装:首先从http://apa ......