Time of Update: 2017-01-13
PHP令我們驚喜的就是在圖形圖象處理方面要憂於ASP,用GD庫PHP就可以輕鬆的實現縮圖。這一篇文章我們的目的就是用GD來產生縮圖,PHP可以把縮圖直接產生輸送到瀏覽器也可以以檔案的形式把其儲存到硬碟當中。在產生縮圖的過程當中我們需要用到GD庫當中的幾個函數:getimagesize(string filename [,array
Time of Update: 2017-01-13
<?php/******************************************************************************參數說明:$max_file_size : 上傳檔案大小限制, 單位BYTE$destination_folder : 上傳檔案路徑$watermark : 是否附加浮水印(1為加浮水印,其他為不加浮水印);使用說明:1.
Time of Update: 2017-01-13
function is_ip($str) {if(!strcmp(long2ip(sprintf("%u",ip2long($ip))),$ip)) return 1;else return 0;}或者(老版本用)function is_ip($str) {$ip = explode(".", $str);if (count($ip)<4 || count($ip)>4) return 0;foreach($ip as $ip_addr)
Time of Update: 2017-01-13
想象過在網站上動態產生flash動畫嗎,本文就讓你步入php flash的激動時代。一、需要的軟體swf的支援庫:http://reality.sgi.com/grafica/flash/dist.99.linux.tar.Z,這個包裡面有文檔,你可以用c來使用它。還有當然是php4了,可以從http://www.php.net得到。二、安裝1、libswf.a安裝#cp dist.99.linux.tar.Z /usr/local#tar xvzf
Time of Update: 2017-01-13
php沒有規定只輸出html檔案,它可以產生動態gif檔案。我在使用php動態產生gif映像時碰到了一些問題,現已解決,我用的是php4.05(for win32)
Time of Update: 2017-01-13
<? //讀取映像的類型 //1 = GIF, 2 = JPG, 3 = PNG, 4 = SWF, 5 = PSD, 6 = BMP, 7 = TIFF(intel byte order), 8 = TIFF(motorola byte order), 9 = JPC, 10 = JP2, 11 = JPX, 12 = JB2, 13 = SWC, 14 = IFF function
Time of Update: 2017-01-13
上次說了一種簡單的迴避GD的作圖方法,而後又用GD作了最簡單的一幅“圖”——直線。這次我就接著畫直線向下說。上次代碼中詳細解釋過的部分,這次不再贅述。<? Header("Content-type: image/png"); $im = ImageCreate (200, 100); $
Time of Update: 2017-01-13
上次說到用GD作各種幾何圖形,以及填充顏色。其中故意把這樣一個較複雜的情況留到後面,這就是手繪多邊形和手繪多邊形的填充顏色。<? Header("Content-type: image/png"); $im = ImageCreate (200, 100); $col_blk =
Time of Update: 2017-01-13
用戶端上傳的頁面: -------------------- upload.htm --------------------- <form enctype="multipart/form-data" method="post"
Time of Update: 2017-01-13
代碼如下複製代碼 $pdfname="test.pdf";$email="test@test.com";$text = "您好,附件中是您需要的pdf檔案。請點擊下載。<br><a href=http://www.111cn.net>www.111cn.net</a>";
Time of Update: 2017-01-13
?> 代碼如下複製代碼 <html> <head> <title>發信給網管</title> </head> <body> <h2 align="center">網管收信</h2><br> <hr><br> <center> <form action="mail.php">
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
Time of Update: 2017-01-13
*@author ray*@since 2009-08-07smtp郵件帳號一定要多,不然會被qq伺服器當作垃圾郵件。2.得適當的休眠smtp.dat檔案格式為smtp.163.com|sss@163.com|密碼smtp.sina.com|www@sina.com|密碼 www.111cn.net程式隨機抽取一個串連,發送郵件,如果發送不成功,將該郵件地址存入sleepmail.dat休眠30分後在發送(這個是為了串連smtp伺服器多次後發送不成功而做的修改)。*/
Time of Update: 2017-01-13
代碼如下複製代碼 <html> <head> <title>發信給網管</title> </head> <body> <h2 align="center">網管收信</h2><br> <hr><br> <center> <form action="mail.php"> 寄件者:<
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
<?php//定義邊界線$boundary = uniqid( "" ); //產生郵件標頭$header = "From: $from Content-type: multipart/mixed;boundary="$boundary" X-Mailer:PHP X-Priority:3";//擷取附件檔案的MIME類型 $mimetype = mime_content_type('test.zip')//擷取附件檔案的名字 $
Time of Update: 2017-01-13
<?/*** 產生縮圖* $srcName----為原圖片路徑* $newWidth,$newHeight----分別縮圖的最大寬,高* $newName----為縮圖檔案名稱(含路徑),預設為加入thumbnail* @param string $srcName* @param int $newWidth* @param int $newHeight*&nbs
Time of Update: 2017-01-13
所需軟體:Apache2.2.8 PHP 5.2.5 Mysql 5.0************************1. 安裝 Apache(安裝包格式)在 Network Domain 和 Server Name 裡填入 127.0.0.1,右下角可以控制 Apache 伺服器的啟動與關閉。安裝好後,在瀏覽器裡輸入 http://localhost/,如果出現 It works!" 字樣,則說明安裝成功了!2. 安裝
Time of Update: 2017-01-13
<?$arr=getimagesize("images/album_01.gif"); echo $arr[3];$strarr=explode(""",$arr[3]);echo $strarr[1];?><HTML> <HEAD> <TITLE>示範圖片等比例縮小</TITLE> <script> function Wa_SetImgAutoSize(img)
Time of Update: 2017-01-13
<?php /* 分頁類 design by xqbar qq:174171262 email:wxddong@163.com blog:http://www.xqbar.com 考慮輸入參數 size(每頁記錄數目) url(串連地址) style(分頁樣式) sql(