Monthly Archives: 8 月 2012

mysql中的时间转换

DATE_FORMAT(date,format)
date 参数是合法的日期。format 规定日期/时间的输出格式。 可以使用的格式有: 格式 描述…

PHP Date()函数详细参数

date_default_timezone_set(PRC);   /*把时间调到北京时间,php5默认为格林威治标准时间*/
date ()
date("Y-m-d",strtotime($t_time)); mktime生成时间戳格式时间,strtotime更好用
mktime(hour,minute,second,month,day,year,is_dst)

PHP 模拟POST 数据

1.fsockopen方式,可post图片:
//例子:socket_post('http://site.com/', array('key1'=>'value1', 'key2'=>'value2'), array('filekey'=>'filepath'))
function socket_post($url, $postdata=array(),