我这显示不了验证码,哪里错了新手求指教
回复讨论(解决方案) 将这行 header('content-type: image/png'); 注释掉看报什么错了。
notice: undefined variable: _nmsg in ...
$_nmsg = ''; //加上这句
for ($i=0;$i $_nmsg .= dechex(mt_rand(0,15));
}
fatal error: call to undefined function imagecreatetruecolor() in d:\wamp\www\testguest0.9\code.php on line 29
这个报错
notice: undefined variable: _nmsg in ...
$_nmsg = ''; //加上这句
for ($i=0;$i $_nmsg .= dechex(mt_rand(0,15));
}
$_img = imagecreatetruecolor($_width,$_height);
说是这里的错误
打了代码就是不显示 我的是火狐浏览器
那你根本就没有加载 php_gd 扩展
fatal error: call to undefined function imagecreatetruecolor() in d:\wamp\www\testguest0.9\code.php on line 29
这个报错
这个错是没找到imagecreatetruecolor()这个方法,你检查一下你的php扩展的php_gd2开启没?
没开 刚在百度查的 我都不知道这个,有学点知识
那你根本就没有加载 php_gd 扩展
fatal error: call to undefined function imagecreatetruecolor() in d:\wamp\www\testguest0.9\code.php on line 29
这个报错
这个错是没找到imagecreatetruecolor()这个方法,你检查一下你的php扩展的php_gd2开启没?