What should I do if the php output image is garbled?

coldplay.xixi
Release: 2023-03-02 16:22:02
original
3035 people have browsed it

Solution to garbled image output from php: First create an image output code named [showimg.php]; then customize the function [rand_create()] to create a random verification code image; finally, display the verification code when needed Just add the link [What should I do if the php output image is garbled?

Solution to garbled picture output by php:

First, create an image output code named showimg.php

db66244a477f3b028815132319bc0f41

The result showed a garbled code similar to the following:

[quote]嘘NG IHDR>?~&aPLTE???热?锳′潽罽北??2?w/{2[緵?Y)描锽顖bT Quanchu陔 Yeah|gnk??霭:1l#?@ E灪勌R鼀chlor骪?憸K\Dun8 peak 9n F暋痖|?Y埄?credit;冡c椥楏鬀6^??訳??娆苀*邝拀1?h.@?_ ?Wshun{弝_L?闍鄈觨?"L8Y2?炂F0?欥_3=孼?D?{(四 tie 5?1宄红饹b0UóB=*魔聬夡屋0黄Gd#?苙??巀>?q!q?Mp璔n贉戈Y篎j ▲2? ??载?愋?(訨Oa忟K?oK迉:嫇K carryingL堨衦絇炆?V贘U鎎|鞇浭?eNt?潊?3????Zphase t?戈秋癭鳋??jv见迬?S1 sense E?gc2啨蚧=?w湋m3U嘊_J熖Specialㄔ訨?B1?sIDATx渃`B&T0哓0? B誊?摮qh`eZ g B碈?8vomitLs @?hft1?m?朿呖@ Trend??I??;? Y?Edge屵z&~0?EL戦gun,$?Au坄?`??A?濸slF"俍Q嵧v?? k鄗嘹?犚HN蹖鎃?P堹[/quote]

[color=red][b]It turns out[/b][/color], this is a segment program, and [b] The program must be located at the very beginning, even if there is a blank line in front of it, and after the graphics are output, no other content can be output [/b]. In this case, a page, Only one picture can be displayed. The solution to the

problem is, create another page and add the link , it is easily solved.

Related learning recommendations: PHP programming from entry to proficiency

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

Related labels:
php
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 [email protected]
Latest issues
Popular Tutorials
More>
Latest downloads
More>
web effects
Website source code
Website materials
Front end template
About us Disclaimer Sitemap
PHP Chinese website:Public welfare online PHP training,Help PHP learners grow quickly!