摘要:
1、PHP的数据类型转换属于强制转换,允许转换的PHP数据类型有: (int)、(integer):转换成整形 (float)、(double)、(real):转换成浮点型 (string):转换成字符串 (bool)、(boolean):转换成布尔类型 (array):转换成数组 (object) 阅读全文
posted @ 2018-10-16 09:54
PHPer_Cody
阅读(183)
评论(0)
推荐(0)
摘要:
1、纯数字验证码 1、新建一个captcha.php <?php //设置session,必须处于脚本最顶部 session_start(); $image = imagecreatetruecolor(100, 30); //1>设置验证码图片大小的函数 //设置验证码颜色 imagecolora 阅读全文
posted @ 2018-10-16 09:48
PHPer_Cody
阅读(584)
评论(0)
推荐(0)
摘要:
随机红包分配算法 1、数值波动大 header("Content-Type: text/html;charset=utf-8");//输出不乱码,你懂的 $total=10;//红包总额 $num=8;// 分成8个红包,支持8人随机领取 $min=0.01;//每个人最少能收到0.01元 for( 阅读全文
posted @ 2018-10-16 09:44
PHPer_Cody
阅读(242)
评论(0)
推荐(0)
摘要:
判断目录是否存在,不存在则循环创建 $path_complete ="qrcodes/online/complete/"; if(!file_exists($path_complete)){ //file_exists检测目录或文件是否存在 mkdir($path_complete,0777,tru 阅读全文
posted @ 2018-10-16 09:43
PHPer_Cody
阅读(335)
评论(0)
推荐(0)

浙公网安备 33010602011771号