Time of Update: 2016-07-25
unction ubb2html($content){global $article;//是否自動識別if ($article['isparseurl'] == "1"){$content = parseurl($content);}//自動識別結束$content = eregi_replace(quotemeta("[b]"),quotemeta(""),$content);$content =
Time of Update: 2016-07-25
這是一個將指定資料庫裡的所有表備份為一個SQL檔案,可下載。 /****** 備份資料庫結構 ******/ /* 函數名稱:table2sql() 函數功能:把表的結構轉換成為SQL 函數參數:$table: 要進行提取的表名 返 回 值:返回提取後的結果,SQL集合
Time of Update: 2016-07-25
樣本用法: $eC = new encodeCookie; $e = $eC->encodeC ( md5 ('password') ); $d = $eC->decodeC ( $e ); echo "Original Cookie value : ".$d; echo ""; echo "Encoded Cookie value : ".$e;
Time of Update: 2016-07-25
緩衝類 /** 緩衝類 cache* 作 者:多菜鳥* 建立時間:2006-05-05* 實 例:include( "cache.php" );$cache = new cache(30);$cache->cacheCheck();echo date("Y-m-d H:i:s");$cache->caching();*/class cache {//緩衝目錄var
Time of Update: 2016-07-25
/****首先是CSDN論壇PHP斑竹xuzuning(嘮叨)老大的,支援gb2312,gbk,big三種編碼。以下是代碼:***/$len = 19;$text = "怎麼將新聞的很長的標題只顯示前面一些字,後面用.....來代替?";echo
Time of Update: 2016-07-25
取得隨機字串 /*作用:取得隨機字串參數:1、(int)$length = 32 #隨機字元長度,預設為322、(int)$mode = 0 #隨機字元類型,0為大小寫英文和數字,1為數字,2為小寫子木,3為大寫字母,4為大小寫字母,5為大寫字母和數字,6為小寫字母和數字返回:取得的字串使用:$code = new activeCodeObj;$str = $code->
Time of Update: 2016-07-25
A quick and simple way to search a MySQL database. 樣本: mysqlsearch('items', 'title tags', isset($GET['q'])?$GET['q']:'', Array('columns'=>'*', 'method'=>'OR', 'extrasql'=>'AND active = "true" ORDER BY id DESC'));
Time of Update: 2016-07-25
在這個程式中,新類FENYE繼承了類DBSQL,所以在新類的解構函式中,調用了父類的解構函式來連結資料庫,同時包含了全域變數定義的檔案config.inc.php。
Time of Update: 2016-07-25
/*** @package Database Class* @author injection (mail:injection.mail@gmail.com)* @version 1.0*/@ini_set( 'display_errors',0 );class DataBase{ private $mDb_host,$mAb_user,$mAb_pwd,$mConn_No; function DataBase( $Conn_Obj ){ $this->connectDb(
Time of Update: 2016-07-25
我自己在用的php日期抓取 echo j7_getdate('Y-m-d','2010-11-15','+10 day');function j7_getdate($format,$time='now',$opt){ return date("$format",strtotime("$time $opt"));}//輸出 2010-11-25//詳細
Time of Update: 2016-07-25
//Exampledco_get_district("160149");/*##################################CONVERT POSTAL CODE TO DISTRICT NUMBER AND NAME################################## */function dco_get_district($postal) {//Define the 28 Districts$districts = array('D01 City -
Time of Update: 2016-07-25
讀取某網站的源檔案,再利用正則分析其原始碼,得到所有連結 /**********qiushuiwuhen(2002-5-20)***********/if(empty($url))$url =
Time of Update: 2016-07-25
/*---*功能:將漢字轉換為拼音*函數:Pinyin*/function Pinyin($_String, $_Code='gb2312'){$_DataKey =
Time of Update: 2016-07-25
一個簡單實現的日曆,我不知道這段代碼實現的方法有沒有問題,沒有參考前輩,等你理解我的爛代碼之後,再欣賞一下別人的優秀代碼,會更有協助 $date = isset($_GET['d']) ? intval($_GET['d']) : '';if($date){$y = substr($date,0,4);$m = substr($date,4,2);$cur =
Time of Update: 2016-07-25
//Creating instance:$gravatarService = new NP_Service_Gravatar_Profiles();//Changing response format to XML:$gravatarService->setResponseFormat(new NP_Service_Gravatar_Profiles_ResponseFormat_Xml());//Getting profile data.$profile = $gravatarService-
Time of Update: 2016-07-25
[production]; logsresources.log.stream.writerName = "Stream"resources.log.stream.writerParams.stream = APPLICATION_PATH "/../data/logs/production.log"resources.log.stream.writerParams.mode = "a"; sessionsresources.session.save_path =
Time of Update: 2016-07-25
驗證碼檔案類 /*** @file* @version 1.0* @author 網海浪子* @date 2006-3-30* @email [email]sxf02615@163.com[/email]* @brief 驗證碼檔案類**/?>class CCheckCodeFile{//驗證碼位元private $mCheckCodeNum =
Time of Update: 2016-07-25
Booleans are used to represent the concepts of true and false. They are most often used for testing if a statement is true or false and they'll play a bigger role when we discuss logical expressions.Note that there is a difference between
Time of Update: 2016-07-25
分享一個中文驗證碼 /*轉載請註明來源於 ITBBS 。修改請聯絡作者信箱:Smartly@itbbs.cn*/Header("Content-type: image/PNG");$str =
Time of Update: 2016-07-25
要求: 只能使用命令列,比較兩個檔案夾的不同,包括檔案的差異。 思考: 雖然linux下有diff。。。。還是用php吧,代碼改的方便,速度也很快,以下排除了.svn目錄的比較 檔案要比較md5校正和 思路: 1)把第一路徑作為標準路徑,列出第1個路徑中有的,第2個路徑中沒有的檔案或檔案夾,或者是不同的檔案。 2)然後,列出第2個路徑中有的,第1個路徑中卻不存在的檔案和檔案夾。 調用樣本: php