The input image IE of the phpheader function is not displayed.

Source: Internet
Author: User
When using the header in php to directly display images dynamically, it is found that the displayed image is an X. This problem is no problem in other browsers and only occurs in IE browsers. how can this problem be solved? At the beginning, img. the PHP file jump to the file is written as follows: h... when using the header in php to directly display images dynamically, it is found that the displayed image is an X. This problem is no problem in other browsers and only occurs in IE browsers. how can this problem be solved?

At the beginning, the img. php file jumps to the file and writes the header ("Location: the absolute URL of the image ");

Then I found that the image cannot be displayed under IE, and all the pictures are displayed as forks, and I enter the img. php URL directly in IE. the webpage will jump to the image URL, but the prompt is displayed:

HTTP Error 403. The request URL is forbidden.

Error. the modification method is header ("Location: relative address of the image ");

It turns out to be a path problem. if the absolute address is used to estimate that the header function is not supported remotely, it will be okay if it is changed to a relative path, in fact, this is a problem with the image address. the code is as follows:

 

This is a jump, so we find that the absolute path is correct, so it is estimated that the address path is incorrect, and the header itself supports the jump.

Article URL:

Reprint ^ at will, but please attach the tutorial address.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.