Home >Backend Development >PHP Tutorial > PHP验证码不显示,请教如何解决

PHP验证码不显示,请教如何解决

WBOY
WBOYOriginal
2016-06-13 12:52:42792browse

PHP验证码不显示,请问怎么解决?
http://103.246.245.147:83/joyin.php?id=joyin_LIIDSBPOQK_313333

GD库是打开的,请问验证码怎么不显示?


------解决方案--------------------
  
session_start();
//session_register('SafeCode');//这个函数已列于废止,使用时会有警告
$type = 'gif';
$width= 60;
$height= 20;
header("Content-type: image/".$type);
srand((double)microtime()*1000000);
$_SESSION['SafeCode'] = $randval = randStr(4,"");
if($type!='gif'&&function_exists('imagecreatetruecolor')){
Statement:
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