getimagesize: failed to create stream

From: Date: Thu, 01 May 2003 09:18:10 +0000
Subject: getimagesize: failed to create stream
Groups: php.general 
Request: Send a blank email to php-general+get-146084@lists.php.net to get a copy of this message
I want to read path and filename of an image ($bild[$i]) from a textfile (liste1.txt) and get the size of that image to open an new window with the image size. I've got the following code: $datei = fopen ("liste1.txt","r"); if ($datei) { while(!feof($datei)) { $bild[$i] = fgets($datei, 255); $artikel[$i] = fgets($datei, 255); $menge[$i] = fgets($datei, 255); $preis[$i] = fgets($datei, 255); $link[$i] = fgets($datei, 255); if ($link[$i]== "Vergeben\r\n") { $r++;} $zeile[$i] = fgets($datei, 255); $zeile[$i] = fgets($datei, 255); $i++; } fclose($datei); } and further down (for the first image): $size=getimagesize($bild[0]); // line 96 echo "<a href=\"javascript:open_window('".$bild[$0]."','".$option."')\"><IMG SRC=\"bildsmall.gif\" BORDER='0' ALT=''></a>"; Sample entry from liste1.txt : ./pics/velotasche.jpg I can open the image in an new window (so I assume the path is correct!), but getimagesize failed: Warning: getimagesize(./pics/velotasche.jpg ) [function.getimagesize]: failed to create stream: Invalid argument in ..... on line 96 Anybody a solution? thanxs martin

« previous php.general (#146084) next »