Re: filemtime problem
| From: | Marek Kilimajer | Date: | Fri, 18 Oct 2002 16:22:06 +0000 |
| Subject: | Re: filemtime problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120534@lists.php.net to get a copy of this message | ||
You open directory $fullpath .'files', but test $fullpath . $file, should be $fullpath .'files/' . $file
Todd Cary wrote:
In the "test script" below, $unixtime is false. What am I missing?
<?php
include "test.inc";
if ($handle = opendir($fullpath . 'files')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
//echo "$file" . " ";
echo ($fullpath . $file . "<br>");
// An example of a file name is "/var/www/html/aralbum/php/artscard_dump.txt"
$unixtime = filemtime($fullpath . $file);
if ($unixtime) echo (date("Y m d", $unixtime) . "<br>");
}
}
closedir($handle);
}
?>