GD库问题

WBOY
Release: 2016-06-23 13:48:02
Original
890 people have browsed it

<?php$im = imagecreate(200,60);$white = imagecolorallocate($im,225,66,159);imagegif($im);?>
Copy after login

输出乱码

怎么回事啊。我只是想创建一个画面。GD库也已经加载了啊。

顺便还有一个 windows下 360 金山 等杀毒软件检测出AppServ有病毒是怎么回事

路径 phpmyadmin/labraries/vls.exe

病毒名win32/Trojan.e6d


回复讨论(解决方案)

header("Content-type: image/gif");$im = imagecreate(200,60);$white = imagecolorallocate($im,225,66,159);imagegif($im);
Copy after login

检测出有病毒很正常
我也经常被杀毒软件检测出病毒
我的处理方式是直接删除
也不影响使用

1.输出乱码是因为你没有设置正确的header,程序默认会用text/plain作为header输出。
而输出gif图片应该用header('content-type:image/gif');
改成这样就可以了。

header('content-type:image/gif'); $im = imagecreate(200,60);$white = imagecolorallocate($im,225,66,159);imagegif($im);
Copy after login



2.phpmyadmin只是一个管理mysql的php程序,不会有exe文件的。phpmyadmin/labraries/vls.exe 这个是木马

Related labels:
gd
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!