作者alpe (薛丁格的猫)
看板PHP
标题Re: [请益] 写线上档案总管遇到问题
时间Mon Dec 11 16:11:29 2006
※ 引述《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