2017,1,3,星期二

一、所需的代码,步骤:
1.新建画布[新建图像]
resource p_w_picpathcreatetruecolor ( int $width , int $height );
2.选取颜色
int p_w_picpathcolorallocatealpha ( resource $p_w_picpath , int $red , int $green , int $blue , int $alpha );
3.画图
bool p_w_picpathellipse ( resource $p_w_picpath , int $cx , int $cy , int $width , int $height , int $color )
4.区域填充
bool p_w_picpathfill( resource $p_w_picpath , int $x , int $y , int $color );
5.生成随机数
int mt_rand( int $min, int $max );
6.随机打乱一个字符串
string str_shuffle( string $str);
7.用 TrueType 字体向图像写入文本
array p_w_picpathttftext ( resource $p_w_picpath , float $size , float $angle , int $x , int $y , int $color , string $fontfile , string $text );
8.返回字符串的子串
string substr ( string $string, int $start[, int $length ] )
9.发送原生 HTTP 头
void header ( string $string [, bool $replace = true [, int $http_response_code]] );
10.以 PNG 格式将图像输出到浏览器或文件
bool p_w_picpathpng ( resource $p_w_picpath [, string $filename ] );
11.销毁一图像
bool p_w_picpathdestroy ( resource $p_w_picpath );
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网站栏目:使用php设计简单验证码-创新互联
路径分享:http://www.jxjierui.cn/article/dccdgj.html


咨询
建站咨询
