What to do if php image output is garbled

藏色散人
Release: 2023-03-02 08:18:02
Original
3366 people have browsed it

Solution to garbled php image output: First open the corresponding file; then add the code statement "header("Content-Type:image/jpg");" to the head of the page. The statement is Used to declare the image type.

What to do if php image output is garbled

The picture displays garbled characters

Just add the following code to the head of the page, which is used to declare the picture type .


        
Copy after login

For more related articles, please visitPHP Chinese website!

The above is the detailed content of What to do if php image output is garbled. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!