看板 PHP 關於我們 聯絡資訊
※ 引述《aaronsoso (YA教授)》之銘言: : 目標: : 我網頁每五秒會refresh一次 : 一但發現檔案數目有變動會出現一個警告視窗 : 我到我現在PO文為止所寫的程式碼為 : $fd =opendir('.'); 是我見寡事少,還是... 我真的沒看過這種寫法說. while(): !? while(){ //dosomething } : while($file = readdir($fd)): : $file_size=filesize($file); : $file_time=date("Y/m/d a h:i",filectime($file));//把Unix timestamp的時間,格式化成您熟習的日期格式 : $filetable=array("filetime"=>array($file_time), : "filename"=>array($file), : "filesize"=>array($file_size)); : 第二個問題是 一開始在抓時間SHOW在網頁上那邊 : 用date(H)抓小時數總是早了整整八小時外 其他都正常 : 這又到底是為了什麼???? GMT +8 date_timezone_get -- Return time zone relative to given DateTime date_timezone_set -- Sets the time zone for the DateTime object -- Live Long and Prosper -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.67.68.236