note 57208 rejected from function.filesize by mazzanet

From: Date: Tue, 27 Sep 2005 07:57:57 +0000
Subject: note 57208 rejected from function.filesize by mazzanet
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-95861@lists.php.net to get a copy of this message
Note Submitter: socobo at gmail dot com ---- I've been having trouble trying to get this to work * there is a table that fits around this: <?php if ($handle = opendir("plusfiles/$u")) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $size=filesize($file); echo "<tr class=subtd2 align=center><td colspan=2>$file</td><td>".date ("F d Y H:i:s", filemtime("$file"))."</td><td>$size</td></tr>"; } } } ?> And then these are the errors I get. Warning: filesize(staff_travel.jpg): failed to open stream: No such file or directory in /home/content/g/a/n/gangwars/html/plus.php on line 99 Warning: filemtime(): Stat failed for staff_travel.jpg (errno=2 - No such file or directory) in /home/content/g/a/n/gangwars/html/plus.php on line 106 However, what the trouble is - it only works with files that are text based like .css etc..etc.. nothing dynamic like an image loads all I get is the file name. Is there simply something I'm leaving out because I've built systems like this before and none of them work - could it be a server error? I'm running Linux.

« previous php.notes (#95861) next »