问答详情
源自:1-3 PHP验证码制作之环境搭建

显示出来是乱码

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title>无标题文档</title>

</head>

<?php

$image = imagecreatetruecolor(100 ,30 );

$bgcolor = imagecolorallocate($image,255,255,255);

header('content-type: image/png');

imagepng($image);

imagedestroy($image);

?>

<body>

</body>

</html>

提问者:爱学习的菜鸟 2016-02-19 15:22

个回答

  • 自恋的疯子linda
    2016-02-20 17:20:52

    header('content-type:text/html;charset=utf-8');