Hi -
1. The reason you're seeing "Jan 1, 1970" is because you're passing in a date value of "0".
2. I'm guessing this is probably because "$filename" wasn't initialized correctly, in which case "filectime()" will return "0" and pass it to "date()".
3. Outside of that, your code appears fine. Here's a sample that runs fine (it prints out "found" and the correct date if test file "/tmp/tmp.txt" exists; it prints out "not found" if it doesn't):
PHP Code:
<?php
$fname = "/tmp/tmp.txt";
if (file_exists($fname))
{
echo "<h2>File " . $fname . " exists!</h2>";
$d = date ("F d Y H:i:s.", filectime($fname));
echo "d: " . $d;
}
else
{
echo "<h2>File " . $fname . " doesn't exist...</h2>";
}
?>
'Hope that helps .. PSM