欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

简单的php验证码生成

程序员文章站 2022-06-16 17:11:38
...
	//生成图片	$width="100";	$height="50";		//生成一个背景,默认黑色	$img=imagecreatetruecolor($width, $height);		//生成颜色	$background=imagecolorallocate($img,200,200,200);	$white=imagecolorallocate($img,255,255,255);	$blue=imagecolorallocate($img,0,0,64);		//替换背颜色	imagefill($img,0,0,$background);		//加入线条	for ($i=1;$i