Time of Update: 2016-07-25
$csvContent = "qwe,qwe,qwe,qwe,qwe,qwe,qwe /n"; header("Content-Type: application/vnd.ms-excel; charset=GB2312"); header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
Time of Update: 2016-07-25
echo phpinfo();?>複製代碼儲存,然後通過瀏覽器開啟phpinfo.php,搜尋‘gd’,看是否有以下這項: 如果有說明系統已支援了GD庫,如果沒有需要重新編譯一下PHP以支援GD庫。 三,GD支援的映像格式GD庫預設不支援所有的映像格式,通過上面那張圖 的資訊,可以看出系統的GD庫支援哪些格式的圖片,JPG Support表示支援JPG格式的,沒有列出來的就不被支援。 四,GD函數的分類GD函數我覺得可以分成6大類:1,獲得資訊2,建立映像3,畫圖4,拷貝5,輸出6,銷毀>>>
Time of Update: 2016-07-25
/*** 發送帶附件的郵件* by bbs.it-home.org*/class CMailFile { var $subject; var $addr_to; var $text_body; var $text_encoded; var $mime_headers; var $mime_boundary = "--==================_846811060==_"; var
Time of Update: 2016-07-25
/*** 用php代碼產生excel或csv檔案中的序號*/public function loop(){ $loop = 0; $charnum = 65; for(; $loop $quotient = intval($loop / 26); $remainder = $loop % 26; $f = $quotient>0? chr($charnum+$quotient-1) : ''; $s = $remainder>=0?
Time of Update: 2016-07-25
/** 強制更新圖片緩存 * @param Array $files 待更新的圖片 * @param int $version 版本* @edit bbs.it-home.org*/ function force_reload_file($files=array(), $version=0){ $html = ''; if(!isset($_COOKIE['force_reload_page_'.$version])){ // 判斷是否已更新過
Time of Update: 2016-07-25
[root@jbxue achievo]# php -v PHP 5.3.6 (cli) (built: Aug 19 2011 19:35:20) Copyright (c) 1997-2011 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend
Time of Update: 2016-07-25
if(extension_loaded('gd')) { echo '可以使用gd'; foreach(gd_info() as $cate=>$value) echo "$cate: $value";}else echo '沒有安裝gd擴充';?> 複製代碼結果顯示為: 可以使用gdGD Version: bundled (2.0.34 compatible)FreeType Support: 1FreeType Linkage: with freetypeT1Lib
Time of Update: 2016-07-25
/** HTML Attribute Filter * Date: 2013-09-22 * Author: fdipzone * ver: 1.0 * edit: bbs.it-home.org* Func: * public strip 過濾屬性 * public setAllow 設定允許的屬性 * public setException 設定特例 * public
Time of Update: 2016-07-25
php5 -m | grep -i gd 或者 php -i | grep -i --color gd 複製代碼2,如未安裝GD庫,則為伺服器安裝,方法如下 # 如果是源碼安裝,則加入參數 --with-gd# 如果是debian系的linux系統,用apt-get安裝,如下 apt-get install php5-gd# 如果是CentOS系的系統,用yum安裝,如下 yum install php-gd# 如果是suse系的linux系統,用yast安裝,如下 yast -i
Time of Update: 2016-07-25
[root@jbxue ~]# yum install php-gd*Setting up Install ProcessSetting up repositoriesbase 100% |=========================| 951 B 00:00update 100% |=========================| 951 B 00:00================================================GD Support
Time of Update: 2016-07-25
建議讀者範圍有開發經驗者。科研人員(由其Numrical)。動手能力強的。只是好奇,對於Linux只是淺嘗輒止的就不建議繼續往下看了。端正學習態度Linux不等於駭客(or Cracker)。當然眾所周知很多“駭客工具”都是Linux平台上的,我協助過很多Linux小白髮現他們殊途同歸都是朝著類似Aircrack-ng去的。但他們不知道的是:Linux只是一個工具,工具不是目的,只是手段。這一點很重要。Linux很快的完成你的需求目標。因為他是個專業層級的工具。工具跟工具之間各有利弊
Time of Update: 2016-07-25
本文介紹下,在windows下開啟php Gd庫的方法,php GD庫在php編程中是處理影像檔一個擴充庫,非常有用,有需要的朋友參考下。方法1,根據不同的PHP版本,由於所用的PHP5解壓包已包含了GD庫,只需要在php.ini裡找到“extension=php_gd2.dll”把前面的“;”去掉即可。方法2,php中如何開啟GD庫在瀏覽器輸入啟用wamp下的GD庫(否則驗證碼可能不能用)設定檔:D:\lamp\php\php.ini 檔案如:>>> 您可能感興趣的文章:php
Time of Update: 2016-07-25
$FILENAME="image.thumb"; // 產生圖片的寬度 $RESIZEWIDTH=400; // 產生圖片的高度 $RESIZEHEIGHT=400;function ResizeImage($im,$maxwidth,$maxheight,$name){ $width = imagesx($im); $height = imagesy($im); if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $
Time of Update: 2016-07-25
header("Content-type: text/html; charset=utf8");/* * 提交請求* @param $header array 需要配置的網域名稱等header設定 array("Host: devzc.com");* @param $data string 需要提交的資料 'user=xxx&qq=xxx&id=xxx&post=xxx'....* @param $url string 要提交的url
Time of Update: 2016-07-25
$str = '我是誰'; //gbk編碼的字串echo mb_substr($str, 0, 1, 'gbk'); //輸出 我 複製代碼mb_substr方法比substr多一個參數,用來指定字串編碼。2,utf-8編碼截取中文字串的例子。 $str = '我abc是誰'; //utf-8編碼的字串echo mb_substr($str, 0, 2, 'utf-8'); //輸出 我a
Time of Update: 2016-07-25
$fp = fsockopen("www.baidu.com", 80, $errno, $errstr, 30);if ($fp) { //這裡請求設定為HEAD就行了 $out = "HEAD /img/baidu_sylogo1.gif HTTP/1.1\r\n"; $out .= "Host: www.baidu.com\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out);
Time of Update: 2016-07-25
tar xzvf zlib-1.2.3.tar.gzcd zlib-1.2.3./configuremakemake install複製代碼2、安裝freetype tar xzvf freetype-2.2.1.tar.gzcd freetype-2.2.1./configuremakemake install複製代碼3、安裝libpng tar xzvf libpng-1.2.12.tar.gzcd libpng-1.2.12cp scripts/makefile.std
Time of Update: 2016-07-25
header("Content-type:image/jpeg") 複製代碼GD庫中有對應的image類型 imagejpeg(),imagegif(),imagepang()5,imageline畫線函數 iamgeline(resource image,int x1,int y1,int x2,int y2,int color); image ---圖片 x1 ---啟始座標 y1 x2 ---終點座標 y26,imagesetpixel畫點函數
Time of Update: 2016-07-25
//class utf8_chinese{ private $utf8_gb2312; private $utf8_big5; public function __construct(){ $this->utf8_gb2312 =
Time of Update: 2016-07-25
分享下php gd庫中的常用函數,配有中文注釋,並做了分類處理,包括 映像資訊、建立/載入映像、輸出映像等php gd庫函數,有需要的朋友參考下。本節內容:php gd庫的函數大全。1,映像資訊: gd_info 取得當前安裝的 GD 庫的資訊imagetypes 返回當前 PHP 版本所支援的映像類型image_type_to_extension 取得映像類型的檔案尾碼image_type_to_mime_type 取得 映像類型的 MIME 類型getimagesize