标签:
sleep(1) //延迟执行时间 md5() //md5加密header(‘Content-Type:text/html; charset=utf-8‘); //设置页面编码date_default_timezone_set(‘PRC‘); //设置时区header("Content-type: text/html; charset=utf-8"); //输出utf-8的头信息strrchr() //查找指定字符在字符串中的最后一次出现@ //错误抑制符 把非致命性的错误 屏蔽掉mt_rand //返回随机整数。 mt_rand(min,max)getimagesize("./images./1.jpg"); //获取原图的宽度和高度//打开各种类型的图片 (gif jpeg png) imagecreatefromgif("1.gif"); imagecreatefromjpeg("1.jpeg"); imagecreatefrompng("1.png");//新建图片 width 500px height:300px imagecreatetruecolor(500,300); //3,复制大图粘贴到小图,并且调整图片大小//imagecopyresized//参数1:目标(小图)的资源;//参数2:原图资源 ; //参数3,4:要放到目标图的X,Y;//参数5,6:从原图复制的X,Y;//参数7,8:复制到目标图后的宽度,高度;//参数9,10:要在原图复制的区域的宽,高度imagecopyresized($smail_img,$f_img,0,0,0,0,$smail_w,$smail_h,$img_w,$img_h);//输出图像bool imagegif ( resource $image [, string $filename ] )imagejpeg();imagepng();//释放资源imagedestroy($old_img); //释放老图片 imagedestroy($new_img); //释放新的图片标签:
原文地址:http://www.cnblogs.com/jacko/p/4882072.html