Time of Update: 2016-07-25
刷百度下拉關鍵詞 http://www.tongqiong.com/read.php?tid-91-ds-1.html //作者:www.tongqiong.com
Time of Update: 2016-07-25
之前寫的一個php線上處理上傳圖片,能夠裁剪。添加浮水印圖,浮水印圖超過靶心圖表片尺寸時,浮水印圖能自動適應靶心圖表片而縮小,浮水印圖可以設定跟背景的合并度.源碼: http://www.pooy.net/phpphp.html *exif_imagetype -- 判斷一個映像的類型*源碼下載:http://www.pooy.net/phpphp.html*說明:
Time of Update: 2016-07-25
1、本例子用到 Xweibo,該架構詳細技術說明見: http://x.weibo.com/download.html 2、使用本例子,僅需要做到: 若無使用memcache,修改設定檔user_config.php 53行 define('CACHE_ADAPTER', 'memcache'); -> define('CACHE_ADAPTER', 'file'); 修改檔案
Time of Update: 2016-07-25
/*mysql 簡單類 by joffe q89949401 圍脖@狂code詩人; 本類全靜態 使用的時候直接include後 用mysql::方法()名即可 由於類在php5裡面全域可視,所以不必擔心變數範圍的問題.如果有什麼意見 請圍脖私信||qq郵件; 目前沒有與預存程序有關的方法,當然預存程序一般是建立資料庫的時候做的. config檔案需要配置以下常量資訊: LIB:類存放位置 DEBUG:是否開啟debug(如果開啟會輸出錯誤資訊跟蹤)
Time of Update: 2016-07-25
Discuz的模板引擎 一個比較好的模板引擎類,很久以前就在網上找到,目測這個Discuz的模板引擎應該很老了,是DZ7.2以前的版本了,自己也用得很順手,分享下這個模板類。 有兩個檔案。一個模板類,一個模板替換中需要用到的函數 原文地址:http://blog.qita.in ?/** * 模板類 - 使用 Discuz 模板引擎解析 *
Time of Update: 2016-07-25
Array ( [C:/test\nice] => Array ( [0] => 建立 文字文件.txt ) [C:/test\nice\複件 nice] => Array ( ) [C:/test\nice\複件 nice\複件 nice] => Array ( [0] => 建立 文字文件.txt ) [C:/test\複件 (2) nice] => Array (
Time of Update: 2016-07-25
人性化的代碼 網頁資原始碼站提示:測試智能人性化提交表單js特效代碼這個代碼看效果--因載入JS有必要重新整理-會自動確定表單焦點的人性化表單,當你把滑鼠放到某個輸入框上的時候,它會自動選中,不需要你再去點擊滑鼠,經常填表單的朋友肯定會喜歡這種小功能,因為經常填表單的朋友,整天面對錶單,多麼希望表單能智能化一點。智能人性化提交表單JS特效代碼網頁資源-網頁代碼站 -
Time of Update: 2016-07-25
2012倫敦奧運會獎牌榜代碼php 使用教程: http://www.tongqiong.com/read.php?tid-94.html define('SINA_SAE', '0'); //是否啟用新浪SAE平台1為使用0為不使用$ayurl="http://2012.titan24.com/medal.html";$content=fcontents($ayurl)
Time of Update: 2016-07-25
每隔1秒輸出,實現-> 第 1 次輸出. 第 2 次輸出. 第 3 次輸出. 第 4 次輸出. 第 5 次輸出. 第 6 次輸出. 第 7 次輸出. 第 8 次輸出. 第 9 次輸出. 第 10 次輸出. 輸出完畢! $buffer = ini_get('output_buffering');echo str_repeat('
Time of Update: 2016-07-25
其實就是把所有的函數用中文打包,是不是蠻好玩的 http://blog.qita.in /** * http://blog.qita.in * @copyright 2012 */function 輸出($字串){ echo $字串;}function 設定頭部($字串){ header($字串);}abstract class 主架構{}class 程式
Time of Update: 2016-07-25
之學習php的時候不敢往演算法上靠近。就是怕擾亂自己的思想,現在回顧一下也還真的就那一回事。嘿嘿!各位有沒有遇到這樣子的情況呢?哈 #冒泡排序法$arr = array(12,45,89,3,24,55,223,76,22,11,89,2,4,5,28,112,20,434,23,65,65,765,6,8,23,5,33,553,45,423,64,77,84,23);
Time of Update: 2016-07-25
class TransFormNumber{ public $chinaData = array('1'=>'壹','2'=>'貳','3'=>'三','4'=>'肆','5'=>'伍','6'=>'陸','7'=>'柒','8'=>'捌','9'=>'玖'); public $chinaDataInt = array('1'=>'元','2'=>'拾','3'=>'佰','4'=>'仟','5'=>'萬','6'=>'拾','7'=>'佰','8'=>'仟','9'=>'億','1
Time of Update: 2016-07-25
/** * transform ' hello, world !' to array('hello', 'world') * url: http://bbs.it-home.org* date: 2013/2/17*/ function strsToArray($strs) { $result = array(); $array = array(); $strs = str_replace(',', ',', $strs); $strs = str_replace("n", ',',
Time of Update: 2016-07-25
echo __FILE__ ; // 取得當前檔案的絕對位址,結果:F:\www\test.phpecho dirname(__FILE__); // 取得當前檔案所在的絕對目錄,結果:F:\www\echo dirname(dirname(__FILE__)); //取得當前檔案的上一層目錄名,結果:F:\?>複製代碼這裡順便提一下php中的另一個函數:chdir()函數。chdir() 函數定義和用法chdir() 函數把當前的目錄改變為指定的目錄。若成功,則該函數返回 true,否則返回
Time of Update: 2016-07-25
第一次分享,讓大家踩踩 @charset "utf-8";*{padding:0;margin:0;}.page {font-size: 14px;text-align:center}.page ul{list-style-type:none;display:table;margin-left:auto;margin-right:auto}.page ul li{min-
Time of Update: 2016-07-25
/** 建立目錄*/function makedir($mudir){$file = "./$mudir";@mkdir($file,0777);}/**先創子摸板檔案路徑*/function writemod($filemodname) {$fp=fopen("showmod.shtml","r");$str=fread($fp,filesize("showmod.shtml"));fclose($fp);$fp=fopen($filemodname,"w");fwrite($fp,$str)
Time of Update: 2016-07-25
最近老是遇到數字轉換中文的問題,寫了個分享一下。大家多指教。 /* * func 數字轉換中文類 * Author shuang * date 2012-08-17 * email:shuangbrother@sina.com */class TransFormNumberNew{ public $chinaData = array('1'=>'壹','2'=>'
Time of Update: 2016-07-25
/* from: http://bbs.it-home.org date: 2013/2/17*/$fp = fsockopen("udp://$ip", $rand, $errno, $errstr, 5); if($fp){ fwrite($fp, $out); fclose($fp); ?>複製代碼針對這種情況,可以修改 php.ini ,禁用 fsockopen 函數,及使用Windows 2003的 安全性原則 屏蔽原生UDP連接埠。1)、禁用函數 尋找到
Time of Update: 2016-07-25
$str = "ffff\0ffff"; echo(strlen($str)); echo("\n"); for($i=0;$iecho("\n");複製代碼輸出結果: ----------------------9 102 102 102 102 0 102 102 102 102二、替換特殊字元的例子 $str = "ffff\0ffff"; $str = str_replace("\x0", "", $str); //或者用$str = str_replace("\0", "",
Time of Update: 2016-07-25
複製代碼儲存在 templates 目錄中。5、建立檔案模板設定檔: config.php include "../libs/Smarty.class.php";$NowPathArray=explode("test",str_replace("\\","/",dirname(__FILE__))) ;@define("root_path", $NowPathArray[0]);@define('__SITE_ROOT', root_path."test");$tpl = new Smarty(