我正在使用以下代码,但它对我不起作用。
$img1=$info['available_now']; //http://www.jjbsports.com/pws/client/images/catalogue/products/65014201/zoom/65014201_white.jpg
$filename = $img1;
if (file_exists($filename)) {
echo "The file $filename exists";
echo '<img src="'; echo $id1; echo '"width="50" height="50"/>'."<br>";
} else {
echo "The file $filename does not exist";
echo '<img src="'; echo $id1; echo '"width="50" height="50"/>'."<br>";
}
请帮助我问候,
找到代码
$headers = get_headers($filename, 1);
echo $filename."=".$headers['Content-Length']."<br>"; // size in bytes