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

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

WBOY
Release: 2016-06-13 12:52:42
Original
769 people have browsed it

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')){
Related labels:
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