![案例-表格输出文件信息-王明昌博客](http://www.wangmingchang.com/wp-content/uploads/2017/11/1-1.png)
案例-表格输出文件信息
源码如下: <?php header("content-type:text/html;charset=utf-8"); include_once('./getfilesize.php'); date_default_timezone_...
源码如下: <?php header("content-type:text/html;charset=utf-8"); include_once('./getfilesize.php'); date_default_timezone_...
文件系统常用的函数 file_exists() 判断文件或目录是否存在; var_dump(file_exists('./4.php)')); var_dump(file_exists('./3.php')); var_dump(file_...
使用到的函数 pow(10, 4)==>10的4次方 round($size,2)四舍五入(变量,位数) 案例 <?php header("content-type:text/html;chsrset=urf-8"); date...
用到的函数 //imagecopy //1,2水印图和原图资源 //3,4 水印图的起始点坐标 //5,6 原图的起始点坐标 //7,8 宽高 //9 透明度 (0-100) imagecopymerge($img , $water, $x...
//imagecopyresampled(); //1.切图的资源 //2.原图资源 //3,4.裁剪图片的起始点坐标 //5,6. 原图裁剪的起始点坐标 //7,8 裁剪图片的宽高 //9,10 裁剪的宽高 $ext = pathinfo...
图片缩放 imagecopyresampled(缩放资源,原图资源,缩放x,缩放y,原图x,原图y,缩放宽,缩放高,原图宽,原图高) getimagesize($imgfile)//获取图片信息,输出形式(数组) dirname($imgf...
文字水印 步骤: 1. 获取图片资源 2. 颜色 3. 设置水印 imagettftext(图片资源,文字大小,角度,位置x,位置y,颜色,字体,水印内容) 4.保存 5.移除资源 //获取图片资源 $img = imagecreatefr...
英文+数字验证码 需要用到的函数 substr $str = '1234567890qwertyuiopasdfghjklzxcvbnmZXCVBNMASDFGHJKLQWERTYUIOP'; switch ($type) { case 1...
源码如下: <?php header("content-type:text/html;charset=utf-8"); $img = imagecreatetruecolor(464,310); $red = imagecoloral...
思路 建立画布 设置颜色 设置背景 作画(重要) 保存输出 移除画布 建立画布 只需设置宽和高 $img = imagecreatetruecolor(500,500); 设置颜色 imagecolorallocate(画布资源,R,G,B...