Page 2 of 2
Posted: Sun Apr 16, 2006 10:41 am
by ozzy
feyd wrote:the usage of
basename() explains why. The file doesn't exist in the local directory, so
filemtime() can't find the file.
Thanks, using your info i added:
and directed the time using that:
Code: Select all
. date ("F d Y H:i:s.", filemtime($location))
------
Onto my next problem...
All the dates and times which are being displayed are:

Posted: Sun Apr 16, 2006 10:43 am
by feyd
You're requesting the modification time of a directory, not a file inside that directory.
Posted: Sun Apr 16, 2006 11:01 am
by ozzy
How would i fix this?
It tyed changing
to
Code: Select all
$location = "vuns/files/$filename";
But that didnt work
Posted: Sun Apr 16, 2006 11:19 am
by feyd
Why even use
basename() if you're adding the directory back on?
You can use
basename() after the call to
filemtime() to do whatever you are using the file name for.
Posted: Sun Apr 16, 2006 11:50 am
by ozzy
I know how to insert the basename, or insert the filename. But what i need to do is insert them both together to so that it can get the date and time, but how would i need to change the code below to do that?
Code: Select all
. date ("F d Y H:i:s.", filemtime($location));
Posted: Sun Apr 16, 2006 11:54 am
by ozzy
Sorry about the double post, but i have managed to do it.
Code: Select all
. date ("F d Y H:i:s.", filemtime($location . $filename));