首頁  >  文章  >  後端開發  >  php 时间获取相差8小时

php 时间获取相差8小时

WBOY
WBOY原創
2016-06-23 13:53:001155瀏覽

php 时间获取相差8小时

by 伍雪颖


date_default_timezone_set('PRC’);
$timeStr = date("Y-m-d H:i:s",time());


服务器加上这句话刚好可以解决AFNetWorking解析json的问题

Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x196463f0 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}



陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn