作者mike5square (普植大爆炸)
看板ZooStudy
標題Re: php
時間Tue Apr 22 15:08:18 2003
<?
$file="1.php";
outputfiletestinfo($file);
function outputfiletestinfo($f)
{
if (!file_exists($f))
{
echo "$f does not exist";
return;
}
echo "$f is ".(is_file($f)?"":"not ")."a file<br>";
echo "$f is ".(is_dir($f)?"":"not ")."a directory<br>";
echo "$f is ".(is_readable($f)?"":"not ")."readable<br>";
echo "$f is ".(is_writable($f)?"":"not ")."writable<br>";
echo "$f is ".(is_executable($f)?"":"not ")."executable<br>";
echo "$f is ".(filesize($f))."bytes<br>";
echo "$f wass accessed on ".date("D d M Y g:i A",fileatime($f))."<br>";
echo "$f wass modified on ".date("D d M Y g:i A",filemtime($f))."<br>";
echo "$f wass changed on ".date("D d M Y g:i A",filectime($f))."<br>";}
?>
--
※ 發信站: 批踢踢實業坊(ptt.csie.ntu.edu.tw)
◆ From: 140.112.7.59