filemtime() error

From: Date: Wed, 06 Nov 2002 19:05:48 +0000
Subject: filemtime() error
Groups: php.general 
Request: Send a blank email to php-general+get-123049@lists.php.net to get a copy of this message
Hi, i'm writing a piece of code that allows me to upload the updated version of my website from the local tree, to the server. I do this by comparing the linux timestamps on the local and remote files. printing a table of the remote files works fine, but when i do it for my local files, i get an error for every file: Warning: stat failed for bandhistory.html (errno=2 - No such file or directory) in /Users/jslootbe/Sites/upload.php on line 71 except for the index.php which just gives me a normal timestamp. this is a dump of the dir: total 232
drwxr-xr-x  25 jslootbe  staff    850 Nov  6 11:20 .
drwxr-xr-x  11 jslootbe  staff    374 Nov  6 13:59 ..
-rwxr-xr-x 1 jslootbe staff 15364 Nov 2 16:11 .DS_Store
-rwxr-xr-x   1 jslootbe  staff    519 Oct 20 20:15 band.php
-rwxr-xr-x 1 jslootbe staff 2034 Oct 23 00:56 bandhistory.html -rwxr-xr-x 1 jslootbe staff 1021 Nov 5 21:50 blindtheory.sql -rwxr-xr-x 1 jslootbe staff 1016 Nov 5 21:32 blindthoery.sql
-rwxr-xr-x   1 jslootbe  staff    322 Oct  8 19:08 colors.inc.php
-rwxr-xr-x   1 jslootbe  staff    146 Oct  8 19:08 contact.php
-rwxr-xr-x 1 jslootbe staff 2266 Nov 5 00:13 dates.php
-rwxr-xr-x   1 jslootbe  staff    188 Oct  8 19:08 globals.inc.php
-rwxr-xr-x   1 jslootbe  staff    194 Oct  9 20:35 globals.inc.php-online
-rwxr-xr-x   1 jslootbe  staff      4 Oct  9 20:32 home.php
-rwxr-xr-x 1 jslootbe staff 3376 Oct 30 21:21 index.php -rwxr-xr-x 1 jslootbe staff 5851 Nov 6 11:20 interaction.php -rwxr-xr-x 1 jslootbe staff 2958 Nov 5 00:16 layout.php
drwxr-xr-x  18 jslootbe  staff    612 Oct 19 13:55 lyrics
-rwxr-xr-x 1 jslootbe staff 1457 Oct 25 20:42 lyrics.php -rwxr-xr-x 1 jslootbe staff 2578 Oct 25 20:32 media.php
-rwxr-xr-x   1 jslootbe  staff    815 Nov  5 00:18 misc.inc.php
-rwxr-xr-x 1 jslootbe staff 1370 Oct 20 19:39 news.php
-rwxr-xr-x   1 jslootbe  staff     21 Oct  8 22:39 phpinfo.php
drwxr-xr-x   7 jslootbe  staff    238 Oct 10 12:38 pics
-rwxr-xr-x   1 jslootbe  staff    148 Oct  8 19:08 template.php
-rwxr-xr-x 1 jslootbe staff 1064 Nov 3 18:53 todo.list and here's the code. $localDir = "/Users/jslootbe/Sites/blindtheory"; if ($opendir = opendir($localDir)) { while ($localList = readdir($opendir)) { if ($localList != "." && $localList != "..") { echo " <tr> <td>".$localList."</td> <td>modified</td> <td>".filemtime($localList)."</td> </tr>"; } } closedir($opendir); } does anyone have any idea why it won't show a stamp for every file? TIA, Jule Jule Slootbeek jslootbeek@clarku.edu

« previous php.general (#123049) next »