html - PHP dynamically generated verification code img tag cannot be loaded

WBOY
Release: 2016-09-02 08:57:06
Original
1486 people have browsed it

The verification code generated using CI’s captcha cannot display the img tag, but can it be displayed when accessing the url? ? ?
html - PHP dynamically generated verification code img tag cannot be loaded
html - PHP dynamically generated verification code img tag cannot be loaded

http://cii.m.com/index.php/ad... can display the verification code

Reply content:

The verification code generated using CI’s captcha cannot display the img tag, but can it be displayed when accessing the url? ? ?
html - PHP dynamically generated verification code img tag cannot be loaded
html - PHP dynamically generated verification code img tag cannot be loaded

http://cii.m.com/index.php/ad... can display the verification code

I don’t know what your specific reason is. Use the ci method to generate the verification code, make sure your img_path is the correct path and have write permission; make sure the GD library extension is turned on

Try adding __ROOT__

header Add the output back, keep it consistent with the image type, and then change echo to return or add an extra exit after echo

Try adding "?"+random string after the url address

Look at the error message about the image path in the console with F12. The problem with the image being unable to come out is more of a path problem

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!