load a php image using src

前端 未结 6 1269
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-20 10:46

Is it possible to load a image using:


?

for image.php:

$ima         


        
6条回答
  •  感动是毒
    2020-12-20 11:08

    Is it possible to load a image use:

    Yes. URLs are URLs. It is content-type that determines content, not any characters in the URL itself.

    $image_id = $_GET['image_id']; echo "image".$image_id.".png";

    Not like that. You either have to read the image file in and then output it with a suitable content-type, or redirect (with a location header) to a static image.

提交回复
热议问题