The image cannot be displayed because it contains errors. Solution

WBOY
Release: 2016-07-29 09:00:55
Original
953 people have browsed it

Verification code problem in php: Get the verification code report The image cannot be displayed because it has errors

Step 1: You can use ob_get_contents() to see if there is anything else output. If so, use ob_clean( ) just clear it

ob_clean() and put it above the header ( "Content-Type: image/{$Imagick->getImageFormat()}" );

Also:

1. Remove Chinese spaces as much as possible
2. Delete all spaces and press Enter before " to prevent html output

The above introduces the solution to the problem that the image cannot be displayed because of its own errors, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

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
Popular Tutorials
More>
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!