轉換ubb代碼的一個函數

unction ubb2html($content){global $article;//是否自動識別if ($article['isparseurl'] == "1"){$content = parseurl($content);}//自動識別結束$content = eregi_replace(quotemeta("[b]"),quotemeta(""),$content);$content =

備份資料庫為SQL檔案

這是一個將指定資料庫裡的所有表備份為一個SQL檔案,可下載。 /****** 備份資料庫結構 ******/ /* 函數名稱:table2sql() 函數功能:把表的結構轉換成為SQL 函數參數:$table: 要進行提取的表名 返 回 值:返回提取後的結果,SQL集合

COOKIE加密函數

樣本用法: $eC = new encodeCookie; $e = $eC->encodeC ( md5 ('password') ); $d = $eC->decodeC ( $e ); echo "Original Cookie value : ".$d; echo ""; echo "Encoded Cookie value : ".$e;

再來一個緩衝類

緩衝類 /** 緩衝類 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

PHP中文字串截取函數

/****首先是CSDN論壇PHP斑竹xuzuning(嘮叨)老大的,支援gb2312,gbk,big三種編碼。以下是代碼:***/$len = 19;$text = "怎麼將新聞的很長的標題只顯示前面一些字,後面用.....來代替?";echo

取得隨機字串

取得隨機字串 /*作用:取得隨機字串參數:1、(int)$length = 32 #隨機字元長度,預設為322、(int)$mode = 0 #隨機字元類型,0為大小寫英文和數字,1為數字,2為小寫子木,3為大寫字母,4為大小寫字母,5為大寫字母和數字,6為小寫字母和數字返回:取得的字串使用:$code = new activeCodeObj;$str = $code->

簡單的 MySQL 搜尋函數

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'));

PHP+MYSQL翻頁符

在這個程式中,新類FENYE繼承了類DBSQL,所以在新類的解構函式中,調用了父類的解構函式來連結資料庫,同時包含了全域變數定義的檔案config.inc.php。

一個構造sql語句的類

/*** @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(

我自己在用的php日期抓取

我自己在用的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//詳細

將新加坡的郵編轉為對應的地區

//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 -

通過讀取某網站的源檔案得到所有連結

讀取某網站的源檔案,再利用正則分析其原始碼,得到所有連結 /**********qiushuiwuhen(2002-5-20)***********/if(empty($url))$url =

將漢字轉換成拼音的php函數

/*---*功能:將漢字轉換為拼音*函數:Pinyin*/function Pinyin($_String, $_Code='gb2312'){$_DataKey =

簡單實現日曆

一個簡單實現的日曆,我不知道這段代碼實現的方法有沒有問題,沒有參考前輩,等你理解我的爛代碼之後,再欣賞一下別人的優秀代碼,會更有協助 $date = isset($_GET['d']) ? intval($_GET['d']) : '';if($date){$y = substr($date,0,4);$m = substr($date,4,2);$cur =

使用 NP-Gravatar 擷取 Gravatar 上的頭像

//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-

Zend Frame 配置資訊執行個體

[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 =

驗證碼檔案類

驗證碼檔案類 /*** @file* @version 1.0* @author 網海浪子* @date 2006-3-30* @email [email]sxf02615@163.com[/email]* @brief 驗證碼檔案類**/?>class CCheckCodeFile{//驗證碼位元private $mCheckCodeNum =

boolean true/false and the strings "true"/"false&

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

再次分享一個中文驗證碼

分享一個中文驗證碼 /*轉載請註明來源於 ITBBS 。修改請聯絡作者信箱:Smartly@itbbs.cn*/Header("Content-type: image/PNG");$str =

用php比較兩個檔案夾的異同

要求: 只能使用命令列,比較兩個檔案夾的不同,包括檔案的差異。 思考: 雖然linux下有diff。。。。還是用php吧,代碼改的方便,速度也很快,以下排除了.svn目錄的比較 檔案要比較md5校正和 思路: 1)把第一路徑作為標準路徑,列出第1個路徑中有的,第2個路徑中沒有的檔案或檔案夾,或者是不同的檔案。 2)然後,列出第2個路徑中有的,第1個路徑中卻不存在的檔案和檔案夾。 調用樣本: php

總頁數: 5203 1 .... 1520 1521 1522 1523 1524 .... 5203 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.