HTML if image is not found

后端 未结 16 2020
温柔的废话
温柔的废话 2020-12-07 13:46

I have an image in a HTML page:

\"Smiley

If the image is not found o

16条回答
  •  一向
    一向 (楼主)
    2020-12-07 14:00

    try PHP

    if (file_exists('url/img/' . $Image)) {
        $show_img_URL = "Image.jpg";
    } else {
        $show_img_URL = "Image_not_found.jpg";
    }
    

提交回复
热议问题