Hi David,

The argument to the functions filemtime(), fileatime() and  filectime() should be a 
valid file name. In your case readdir() returns file names in the directory located by 
$current_dir but these files does not exist in the current directry where the script 
is executed.

You can fix this by adding the fill path when calling filemtime("$current_dir/$file"). 
This should fix your problem.

- Frank

> I could really use some help on this .. I know there must be someone
> out there who knows:
> 
> a) is it possible to get the date/time from a directory in windows
> (win2k)
> 
> b) if it is possible .. then how
> 
> As mentioned in my original post I have tried both filemtime and
> fileatime.  Here are the specific lines ..
> 
> <snip>
>       $current_dir = "h:\my music";
>       $dir = opendir($current_dir);
>       
>       echo "Upload Directory is $current_dir<br>";
>       echo "Directory Listing:<br><hr><br>";
>       while ($file = readdir($dir)) {
>               echo "$file  ";
>               echo date("j F Y H:i",filemtime($file)) . "<br>";
>               echo date("j F Y H:i",fileatime($file)) . "<br>";
> </snip>
> 
> There will be no date except for the . and .. directories.  The rest
> will be 31 december 1969.  Now this was a great year but ...
> 
> So anyone with good info please respond.  I need to get this working
> 
> Thanks
> 
> DSig
> 
> On Sun, 26 Aug 2001 14:43:55 -0700, [EMAIL PROTECTED] (David Tod
> Sigafoos) wrote:
> 
> >I am trying to get the date/time off of a directory.
> >
> >I have tried both fileatime and filemtime but both return a null
> >
> >Any ideas?  Sample of working code?
> >
> >  
> >
> >-- 
> >DSig                                 `````
> >David Tod Sigafoos                  ( O O )
> >mailto:[EMAIL PROTECTED] _______oOOo__( )__oOOo_______
> >
> >Using 'The Bat' 1.53 Beta/4
> >
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 
> 




-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to