Time of Update: 2016-07-25
PHP架構的第一個版本,希望使用此架構的人可以提供寶貴的意見。以及相關的BUG。我會在以後的版本中不斷完善。 架構的檔案中擁有大量的注釋資訊,在使用時可以提供參考。 此版本架構中包含了smarty模版工具、fckeditor編輯器、flash批量上傳檔案、jquery相關外掛程式等工具,同時架構中還整理包含了一套後台系統模版,便於php開發人員使用。 架構的具體使用手冊將在個人的部落格中發布 :http://blog.sina.com.cn/u/1971905881。 下載地址:
Time of Update: 2016-07-25
根據星期擷取月份日期 /** * 根據星期擷取月份日期 * @param int $weenNum 星期0-6 * @return array $days 返回日期數組 */public function
Time of Update: 2016-07-25
最新版本(v1.3): http://code.google.com/p/php-fetion/downloads/detail?name=phpfetion_v1.3.0.zip (2012年7月23日:修複了不能給好友發送資訊的問題,在給好友發資訊時加上csrfToken欄位) 更新情況請關註:http://blog.quanhz.com/ (一)使用說明 1. 需要包含進你的程式的檔案只有一個:PHPFetion.php。如: require 'PHPFetion.php'; 2.
Time of Update: 2016-07-25
文章任意位置隨機加入特定字串php代碼,使用教程: http://www.tongqiong.com/read.php?tid-102.html /*假設你的文字變數名為$str,需要插入的代碼變數名為$ad[1], $ad[2], .....作者:http://www.tongqiong.com*/$ad[1]="同窮論壇";$ad[2]="哪裡購物";$ad[3]="
Time of Update: 2016-07-25
//////////// 張樹林 - 慧佳工作室//// Module Name: woods-bhtml.php// Abstract: 產生靜態HTML處理常式尾底// Version: 2.0// 著作權 1001-1006,慧佳工作室所有著作權保護//The software for free software, allowing use, copy,//modify and distribute the software and files. Any//use of this
Time of Update: 2016-07-25
php設計模式之適配器模式,即Adapter(別名Wrapper)模式:將一個類的介面,轉換成客戶期望的另一個類的介面。適配器可以讓原本介面不相容的類合作無間。php設計模式之適配器模式,即Adapter(別名Wrapper)模式:將一個類的介面,轉換成客戶期望的另一個類的介面。適配器可以讓原本介面不相容的類合作無間。這種設計模式的要點:1)、適配器模式主要應用於“希望複用一些現存的類,但是介面又與複用環境要求不一致的情況”,在遺留代碼複用、類庫遷移等方面非常有用。2)、適配器模式有對象適配器和
Time of Update: 2016-07-25
//未考慮浮點型/* * method 1 * echo number_format($str,2,'.',','); */ /* method2 * 先反轉字串strrev 再str_split($str,3); $str = strrev($str); $arr = str_split($str,3);//987 $res = ''; $count = count($arr);
Time of Update: 2016-07-25
//----------------------------------------------------//函數名:csubstr//作 用:截字串,漢字一個算兩個字元,英文算一個字元//針對GBK(GB2312)編碼的網站//參 數:$str ----原字串// $start ----開始長度// $len ----截取長度//傳回值:截取後的字串//整理人:itlearner//-------------------------------------
Time of Update: 2016-07-25
$C = new Collection();$C->url = 'http://bbs.it-home.org/subject_search?cat=1001&search_text=%E5%B9%B4%E8%BD%BB%E4%BA%BA';$C->startFlag = '';$C->endFlag = '';$C->init();$C->regExp =
Time of Update: 2016-07-25
class MY_Controller extends CI_Controller{ public function __construct() { parent::__construct(); /*判斷是否登入,判斷當前URL是否是auth/login*/ if ( ! $this->tank_auth->is_logged_in() && ( $this->router->fetch_class() != '
Time of Update: 2016-07-25
session_start();$image = imagecreatetruecolor(58,22);$color_Background = imagecolorallocate($image,255,255,255);imagefill($image,0,0,$color_Background);$key = array(‘0′,’1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′,‘a’,'b’,'c’,'d’,'e’,'f’,'g’,'h’,'i’,'j’,'k’,'
Time of Update: 2016-07-25
function daddslashes($string, $force = 0) { if(!$GLOBALS['magic_quotes_gpc'] || $force) { if(is_array($string)) { foreach($string as $key => $val) { $string[$key] = daddslashes($val, $force); } } else { $string =
Time of Update: 2016-07-25
//論壇api登入介面地址 $uri = "http//www.wap.com/ssdfasdfsf" //參數數組 $data = array( 'username' => 'username', 'password' => 'password', ); //操作執行 $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $uri);
Time of Update: 2016-07-25
/*二級目錄按ID返回一個二級目錄,用於將內容平均分布在36*36個目錄中。36個目錄為a-z0-9*/function IDcat($id){$p0 = $id % 1296;$p1 = ceil($p0 / 36)-1;$p2 = ($p0-1) % 36 ;return IDnum($p1).’/’.IDnum($p2).’/';}function IDnum($i){if($iif($i==-1){return ‘z’;}else{return $i;}}else{return chr(
Time of Update: 2016-07-25
貨幣數字轉換為中文大寫的php代碼 :<p><?php/** 元後面才加整,有角的就不加整字。*/function num2rmb ($num){$c1=”零壹貳三肆伍陸柒捌玖”;$c2=”分角元拾佰仟萬拾佰仟億”;</p><p>$num=round($num,2);$num=$num*100;if(strlen($num)>10){return “oh,sorry,the number is too
Time of Update: 2016-07-25
php擷取各城市72小時天氣預報內容 擷取各城市天氣預報內容data.txt下載:http://3.ibtf.sinaapp.com/data.txt[注意網頁編碼] 示範地址: http://3.ibtf.sinaapp.com/?city=%E7%9F%B3%E5%AE%B6%E5%BA%84 function
Time of Update: 2016-07-25
$result = $this->result_row($query); 這裡的 $this->result_row() 方法是我自己瞎寫的, 懶得寫執行QUERY和檢測結果數量方法, 不懂怎麼寫的留言或直接看PHP的 mysql教程 www.w3school.com.cn 一個很好的網站....^_^ :::使用方法::: $user = $_POST['user']; if(CheckVal('member','user',$user)){ echo
Time of Update: 2016-07-25
class Pagination 獨立分頁類 調用方式: $pagenation = new Pagination( 4, 10, 200 ); // 4(第一個參數) = currentPage, 10(第二個參數) = pageSize, 200(第三個參數) = 總數 $pagenation->set_link( 'http://www.360hqb.com' ); $pagenation->show();
Time of Update: 2016-07-25
新浪PHP架構純淨版1.1(帶漂亮的瀑布流模板) 示範地址 模板中調用的是 56網開放平台 的視頻資料。。 1、包括無廣告的站外播放器; if( !$trip = $mm->get($key_trip)){ $trip = $this->con->hotVideo(27);
Time of Update: 2016-07-25
只要把該php放進UCenter目錄下,執行就可以了.來源: http://www.tongqiong.com/read.php?tid-27-ds-1.html //作者:www.tongqiong.com//header("content-type:text/html;