Time of Update: 2016-07-28
1.Oauth(開放授權)是一個開放標準,允許使用者讓第三方應用訪問該使用者在某一網站上儲存的私密資源(如照片,視頻,連絡人清單),而無需將使用者名稱和密碼提供給第三方 關鍵字:appKey appSecret token(令牌) 2.SSO授權如果本地手機裝有微部落格戶端,則直接跳轉到微部落格戶端,只需點擊授權按鈕,就可以登陸了
Time of Update: 2016-07-28
首先從以下結構體開始,他也被包含在ngx_http_upstream_srv_conf_s結構中typedefstruct {/*typedef ngx_int_t (*ngx_http_upstream_init_pt)(ngx_conf_t*cf,ngx_http_upstream_srv_conf_t *us);*/ ngx_http_upstream_init_pt init_upstream; ngx_http_upstream_init_peer_pt
Time of Update: 2016-07-25
請注意:不管頁面有多少header,它會執行最後一個,不過是有條件的,例如: header('Location:http://bbs.it-home.org'); header('Location:http://www.g.cn'); header('Location:http://www.baidu.com');複製代碼這個就會跳到百度header('Location:http://bbs.it-home.org');header('Location:http://www.g.cn');
Time of Update: 2016-07-25
/***Author:烏鳥heart*實現長文章分頁的代碼*原理:*利用一個數組來記錄文章每一頁(用p0、p1、p2...做手動標記)的起始位元組數,然後通過利用php函數操作這個數組去顯示分頁後的文章。分頁顯示,傳遞ptag(與tag的值一樣)值。*利用到的php函數:*1、strlen("字串") - Returns the length of the given string. - 返回字串的位元組總數。*2、strpos("字串","匹配字元") - Returns the
Time of Update: 2016-07-25
轉載地址: http://blog.qita.in/?post=275 使用方法: require_once('360.php'); //http://blog.qita.infunction customError($errno, $errstr, $errfile, $errline){ echo "Error number: [$errno],error
Time of Update: 2016-07-25
ob_start(); //開啟緩衝區echo \"Hellon\"; //輸出header("location:index.php"); //把瀏覽器重新導向到index.phpob_end_flush();//輸出全部內容到瀏覽器//by bbs.it-home.org?>
Time of Update: 2016-07-25
本文介紹下,php中用cookie實現記住密碼功能的一例代碼,有需要的朋友參考下。登入頁面用的jquery.cookie.js來擷取的,對密碼進行md5加密。加密的同時還設定了一個安全碼,在使用者的密碼前加一段字元。又想了一個辦法就是在cookie裡面加了一個版本資訊。通過判斷版本資訊,即可解決以前記住了密碼的使用者通過輸入也能登入。以下是cookie編碼與解碼的過程,很簡單,供大家參考吧。代碼:例子很小,僅提供一種實現的思路吧,希望可以協助到大家。
Time of Update: 2016-07-25
本文介紹下,用php實現記錄搜尋引擎關鍵詞的一段代碼,作為初學者的入門參考,還是不錯的。用php實現記錄搜尋引擎搜尋關鍵詞,代碼如下:'word', 'google.com'=>'q', 'sina.com.cn'=>'word', 'sohu.com'=>'word', 'msn.com'=>'q',
Time of Update: 2016-07-25
set_time_limit(0);function fnGet($filename){$content = file_get_contents($filename);return $content;}function fnGetContent($filename){$content = fnGet($filename);return $content;}$times=100000;echo
Time of Update: 2016-07-25
分享一個php實現的圖片處理類,可以設定文字浮水印與圖片浮水印等,有需要的朋友參考下。本節分享一個圖片處理類,簡單實現了文字浮水印與圖片浮水印,是學習php圖片操作的小例子。代碼:image = new Imagick($tplImage); } /** * 設定文字屬性 * * @param string $sText text to print on the image (i.e. Buy 1 Get 1 Free ) * @param integer $x
Time of Update: 2016-07-25
net user mysqlstart ****microsoft /addnet localgroup users mysqlstart /del 複製代碼不屬於任何組如果MYSQL裝在d:\mysql ,那麼,給 mysqlstart 完全控制的許可權。然後,在系統服務中設定,MYSQL的服務屬性,在登入屬性當中,選擇此使用者 mysqlstart 然後輸入密碼,確定。重新啟動
Time of Update: 2016-07-25
/*** 字串替換函數* edit: bbs.it-home.org*/function replace($string,$keyArray,$replacement,$i){ $result=''; if($i $strSegArray=explode($keyArray[$i],$string); foreach ($strSegArray as $index=>$strSeg){ $x=$i+1;
Time of Update: 2016-07-25
$filename="./files.text"; $fp=fopen($finename,"rb"); $encho fread($fp,100); ?>複製代碼readfile(),file()和file_get_contents()函數. readfile(),file()和file_get_contents()函數. int readfile(string filename[,bool use_include_path,resource
Time of Update: 2016-07-25
function Test() { $w3sky = 0; echo $w3sky; $w3sky++; } ?>複製代碼本函數每次調用時都會將 $w3sky 的值設為 0 並輸出 "0"。將變數加一的 $w3sky++ 沒有其到效果,因為一旦退出本函數則變數 $w3sky 就不存在了。例子,實現一個不會丟失本次計數值的計數函數,要將變數 $w3sky 定義為靜態(static)的,就用到了php靜態變數。php靜態變數的簡單例子 function Test() { static $w3sky
Time of Update: 2016-07-25
下面的函數列出目錄中的所有子目錄: function listdir($dir){ if ($handle = opendir($dir)){ $output = array(); while (false !== ($item = readdir($handle))){ if (is_dir($dir.'/'.$item) and $item != "." and $item != ".."){
Time of Update: 2016-07-23
使用新浪IP庫擷取IP詳細地址class Tool{ /** * 擷取IP的歸屬地( 新浪IP庫 ) * * @param $ip String IP地址:112.65.102.16 * @return Array */ static public function getIpCity($ip) { $ip =
Time of Update: 2016-07-22
調試技術是我們編程中不可或缺的重要部分,調試器是每個IDE環境都必備的組件。既然如此,Zend Studio的Integration Environment擁有一個調試器也就是理所當然的事情了,但是,該調試器在配置使用起來,其顯示出來的強勁功能一定會讓你驚歎不已!事實上,Zend
Time of Update: 2016-07-21
只要安裝一些第三方的庫檔案並具有一定的幾何知識,就可以利用PHP來建立和處理映像了。利用PHP建立生動影像是相當容易的一件事情。下面,筆者將詳細介紹如何?。在使用基本的映像建立函數之前,需要安裝GD庫檔案。如果要使用與JPEG有關的映像建立函數,還需要安裝jpeg-6b,如果要在映像中使用Type
Time of Update: 2016-07-21
PHP IP地址格式檢測函數複製代碼 代碼如下:function checkIp($ip){ $ip = str_replace(" ", "", $ip); $ip = strtolower($ip); $ip= str_replace("http://", "", $ip); $ip= str_replace("https://", "", $ip); if(preg_match('/[A-Za-z_-]/',$ip)){
Time of Update: 2016-07-21
檔案七:globres.tml 下面結果來自本站提供的網域名稱查詢系統, 你可以訂購沒有註冊的網域名稱或者查詢註冊網域名的詳細資料。SCRIPT_NAME單擊這裡 返回網域名稱查詢首頁 下面網域名稱不可以申請註冊: T下面網域名稱可以申請註冊: [>AVAIL_LIST [>UNAVAIL_LIST 檔案八:isavail.tml 恭喜您!網域名稱 [>DOMAINEXT 沒有被註冊! 通過 [>WHOIS_SERVER 查詢顯示本網域名稱 "[>