Home > Backend Development > PHP Tutorial > header("Conteng-type: image/png") 页面变成只有图片

header("Conteng-type: image/png") 页面变成只有图片

WBOY
Release: 2016-06-23 14:25:04
Original
857 people have browsed it

验证码 php image

最近在学习>,照着第一章的代码敲了敲
在验证码那一段有一句header("Conteng-type: image/png") 
用上这一句的话,页面就变成只有图片了,注释掉的话,图片可以显示,但会有乱码
百思不得其解,求搭救!

回复讨论(解决方案)

header("Conteng-type: image/png")  这一句是将文档当图片输出,当然只有图片了。

谢谢你的回复,我已经找到问题了,结贴~~~

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