Time of Update: 2017-01-13
# 顯示圖形及串連 function showdir ($adirectory, $i){ global $browsedir; $start = $i;# 更改 $maxcols 及 $maximages 可改變每一頁顯示的小圖的行數與列數。 $maxcols = 2; $maximages = 6; $maximages = $i + ($maximages - 3);# 更改 $imagemaxwidth 及
Time of Update: 2017-01-13
代碼如下複製代碼 session_start();$im=imagecreatetruecolor(100,30);//分配顏色$bg=imagecolorallocate($im,0,0,0);$textcolor=imagecolorallocate($im,255,255,255);//在圖片上劃線for($i=0;$i<3;$i++){$te1 = imagecolorallocate($im,rand(0,255),rand(0,255),rand(0,255)
Time of Update: 2017-01-13
1 產生一個簡單映像。2 設定映像的顏色。3 在映像上繪製直線。4 在映像上顯示文字。5 在映像中顯示中文字元。6 開啟已存在的圖片。7 擷取圖片的相關屬性。8 函數getimagesize()的用法。9 為上傳圖片添加浮水印效果。10 產生已有圖片的縮圖。11 使用函數imagecopyresampled()。12 產生帶有底紋的數字驗證碼圖片的php程式。*///1&nbs
Time of Update: 2017-01-13
代碼如下複製代碼 function
Time of Update: 2017-01-13
有3個檔案:authcode.php-----驗證碼的產生php檔案authcode.html-----前台顯示頁面dealauthcode.php-----ajax提交到的幕後處理判斷驗證碼是否正確的處理頁面*/?>前台調用驗證碼代碼 代碼如下複製代碼 <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1
Time of Update: 2017-01-13
<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta
Time of Update: 2017-01-13
代碼如下複製代碼 class image{ public $filename; private $info; private
Time of Update: 2017-01-13
*/ 代碼如下複製代碼 class cd_barra{ var $file; var $into; var $cd_barras =
Time of Update: 2017-01-13
代碼如下複製代碼 function createimage($data,$twidth,$tspace,$height){ $dataname =
Time of Update: 2017-01-13
$image->wprint_img();//執行圖片浮水印$image->wprint_string();//執行文字浮水印*/ 代碼如下複製代碼 class editimage{ private $imagefile;//圖片檔案 private $smallimg;//浮水印圖片 private $string;//浮水印文字 private $position;//存放位置 private $dst_x=6
Time of Update: 2017-01-13
//config.php//=================================使用者配置區=================================$per=1; //每次處理的圖片數目$dir1='img'; //輸入目錄$dir2='img2'; //輸出目錄 輸出圖片會儲存於$dir2/$dir1
Time of Update: 2017-01-13
代碼如下複製代碼 class upfile { public $filepath = "www.111cn.net/"; //上傳檔案存放檔案夾 public $filesize = 1000000; //允許上傳的大小 //如果要修改允許上傳檔案的類型 請搜尋 【 switch ($upfiletype) { //檔案類型 】 public $reimagesize =
Time of Update: 2017-01-13
代碼如下複製代碼 $image=$_get[id];$im=getimagesize($image);//print_r($im);//以下是讀取文字的寬高$font='verdana.ttf';//字型$font_size = $im[0]/20;//文字大小$size=imagettfbbox($font_size,0,$font,'111cn.net');//文字寬高$textwidth = $size [4];//取出寬$textheight = abs( $size
Time of Update: 2017-01-13
在web應用中經常會用到產生圖片這一功能,在php教程
Time of Update: 2017-01-13
代碼如下複製代碼 class chart{var $a; //橢圓長半軸 var $b; //橢圓短半軸 var $DataArray; //每個扇形的資料 var $ColorArray; //每個扇形的顏色 要求按照十六進位書寫但前面不加0x //為邊緣及陰影為黑色function chart($pa=100,$pb=60,$sData="100,200,300,400,500,300", $sColor="ee00ff,dd000
Time of Update: 2017-01-13
<? 代碼如下複製代碼 $w?$RESIZEWIDTH=$w:$RESIZEWIDTH=400;// 產生圖片的寬度$h?$RESIZEHEIGHT=$h:$RESIZEHEIGHT=400;// 產生圖片的高度function ResizeImage($im,$maxwidth,$maxheight,$name){ $width = imagesx($im); $height = imagesy(
Time of Update: 2017-01-13
代碼如下複製代碼 <?php教程header("Content-type: image/jpeg");// 載入映像$imagen1 = imagecreatefromjpeg("imagen1.jpg");$imagen2 = imagecreatefromjpeg("imagen2.jpg");// 複製映像www.111cn.netimagecopy($imagen1,$imagen2,0,0,0,0,20
Time of Update: 2017-01-13
function image3($length=4,$type='png',$width=180,$height=60,$fontface='fpnf.ttf',$verifyName='verify') { $code = $this->rand_string($length,4); $width =
Time of Update: 2017-01-13
php imagecreatefromgif建立 gif圖片imagecreatefromgif($filename)imagecreatefromgif()返回一個映像標識符代表從給定的檔案名稱獲得的映像$filename是gif圖片名稱哦。來看個執行個體<?phpfunction LoadGif($imgname){ /* Attempt to open */ $im = @imagecreatefromgif($
Time of Update: 2017-01-13
php 驗證碼產生程式[可自動判斷php gd庫]function ShowKey(){$key=strtolower(domake_password(4));$set=esetcookie("checkkey",$key); //是否支援gd庫if (function_exists("imagejpeg")) { header ("Content-type: