开发者

Checking image empty or not

$image = "http://www.example开发者_StackOverflow中文版.com/image.jpg";

if(!empty($image)){echo "<img src='".$image."' align='left' />";}

the above syntax wont successful in returning image empty or not...if image is empty in IE this shows a blank space with link like image is missing

Checking image empty or not


While your question makes no sense, $image being a string you assigned a value to, I suspect that you want to check whether that image exists and is a valid image. Try if (getimagesize($image))

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜