Time of Update: 2016-06-20
錯誤1:configure: error: xml2-config not found. Please check your libxml2 installation. 解決:yum install -y libxml2-devel 錯誤2:configure: error: Cannot find OpenSSL's 解決:yum install -y openssl openssl-devel 錯誤3:checking for BZip2 in default path..
Time of Update: 2016-06-20
裝好了amqp後就可以開始編寫代碼了: 消費者:接收訊息 邏輯: 建立串連-->建立channel-->建立交換器-->建立隊列-->綁定交換器/隊列/路由鍵-->接收訊息 '192.168.1.93', 'port' => '5672', 'login' => 'guest', 'password' => 'guest', 'vhost'=>'/' ); $e_name = 'e_linvo'; //交換器名 $q_name =
Time of Update: 2016-06-20
why xdebug extension must be loaded as a zend extension? what is zend extension and what are the differents between regular php extension and zend extension? let’s start from that the extension loading process. PHP是可以被擴充的, PHP的核心引擎Zend
Time of Update: 2016-06-20
測試環境 lyolzj@localhost /usr/local/src/zendopcache-7.0.5 $ lscpu Architecture: i686 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core:
Time of Update: 2016-06-20
name = $name; } public static function getInstance(){ if(self::$instance==null){ return new Singleton(""); } return self::$instance; } public function printString(){ echo "hello,this is printString()
Time of Update: 2016-06-20
include_once ('conn.php');//error_reporting(0);@$shops_name= $_GET["shops_name"];if (isset($shops_name)) {echo $shops_name;$query = "SELECT * FROM goods WHERE ShopName= '$shops_name'";@$q = $conn->query($query);while($row=$q->fetch_array()) {$select[
Time of Update: 2016-06-20
第一次嘗試用sphinx來做全文檢索搜尋,可能有很多見解都不是很正確。有不同的想法,大家可以提出來。 現在版本的sphinx不知道支不支援中文了,問了群裡的朋友都說不支援,所有用了以下的這種方法來做。 1、文章的處理。 假如文章表為article_main id title summary content time 1 測試的標題 測試的摘要 測試的內容 123123123
Time of Update: 2016-06-20
原文來自: https://jellybool.com/post/programming-with-laravel-5-model-controller-view-basic-workflow 期間受到很多私事影響,終於還是要好好寫寫laravel的教程了。 上一篇我們說了資料庫和Eloquent的基本用法,如計劃一樣,這一篇文章我們說說Laravel中Model,Controller,Views的工作流程,也就是下面這個順序: 1.註冊路由 ---> 2.建立控制器 ---> 3.
Time of Update: 2016-06-20
有時我們需要隱藏真實的檔案下載地址,防止惡意下載,我們可以採用下面的方法(參考網路,侵權請告知) 以下為引用的內容: $file_name = "example.exe"; $file_dir = "/public/www/download/"; if (!file_exists($file_dir . $file_name)) { //檢查檔案是否存在 echo "檔案未找到"; exit; } else { $file =
Time of Update: 2016-06-20
原文來自:https://jellybool.com/post/programming-with-laravel-5-laravel-forms-input 在開始之前,我們把介面先美化一點點先: 首先到https://github.com/JellyBool/blog-css-js得到靜態檔案,然後分別修改下面三個檔案: 1. app.blade.php2. articles/index.blade.php3. articles/show.blade.php
Time of Update: 2016-06-20
本文通過逐步完善一個驗證手機號的Regex來介紹了Regex中的字元組、量詞、字串起始/結束位置、分組、分組中的選擇結構、反向引用、命名分組等概念。 1 基本驗證 即驗證字串是否是11位元字。 運算式 [0123456789]{11} 或[0-9]{11} 或 \d{11} 知識點
Time of Update: 2016-06-20
做了一個sql查詢,還通過了擷取的數組下標來排序。但是前輩說會有大量訪問的時候這樣很消耗記憶體,網上看了下好多說的方法是做cache,有沒有其他的方法處理呢? 回複討論(解決方案) 你的語句,不會很消耗記憶體。activeNum是索引就可以了。 當然有cache是最好的。 你的語句,不會很消耗記憶體。activeNum是索引就可以了。 當然有cache是最好的。 要是有幾十萬上百萬的資料,每次有人訪問index就去取一次不會消耗資源嗎?
Time of Update: 2016-06-20
$sql= $sql= $sql=sprintf( sql語句 )和這種有什麼區別?? 回複討論(解決方案) ...... EOT; 自訂文本定界符 請參考heredoc的用法:http://blog.csdn.net/misakaqunianxiatian/article/details/47975651 Heredoc Heredoc 相當於雙引號
Time of Update: 2016-06-20
class MyClass{ public $public = 'public'; protected $protected = 'protected'; private $private = 'private'; function printHello(){ echo $this->public; echo $this->protected; echo $this->private . "";
Time of Update: 2016-06-20
$article['content'] = str_replace('[attach_40]', $this->get_attach_url('40'), $article['content']);$article['content'] = str_replace('[attach_41]', $this->get_attach_url('41'), $article['content']);$article['content'] = str_replace('[attach_42]',
Time of Update: 2016-06-20
我用curl類比post提交一個網站,為什麼會返回這個資訊呢? 回複討論(解決方案) 403 是沒有執行權 需要知道你的代碼和目標 403 是沒有執行權 需要知道你的代碼和目標 服務端那邊是做了些什麼限制呢?能詳細說說嗎 沒有存取權限。 把user agent加上再訪問試試。 curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0;
Time of Update: 2016-06-20
0,'val'=>'頂級菜單1','parent'=>-1);$mixTree[] = array('id'=>1,'val'=>'頂級菜單2','parent'=>-1);$mixTree[] = array('id'=>2,'val'=>'頂級菜單1下的二級菜單1','parent'=>0);$mixTree[] = array('id'=>3,'val'=>'頂級菜單1下的二級菜單2','parent'=>0);$mixTree[] =
Time of Update: 2016-06-20
完美為共用主機環境,其中它通常不可能到使用或安裝常規防防毒保護,phpMussel是一個PHP指令碼旨在檢測木馬,病毒,惡意軟體,和其他威脅在檔案上傳到您的系統隨地這個指令碼是叫,根據ClamAV的簽名和其他簽名。 PHPMUSSEL著作權2013和此後GNU/GPLv.2通過Caleb M (Maikuolan)。
Time of Update: 2016-06-20
var_dump(strtotime('1441185010'));//輸出bool(false)var_dump(strtotime('1451382400'));//輸出int(13591003898) 很奇怪,為什麼這兩個的結果不一樣呢? 回複討論(解決方案) 我PHP5.6返回兩個false,你的PHP是什麼版本。 我PHP5.6返回兩個false,你的PHP是什麼版本。 我是PHP Version 5.3.3,centos6.4 64位虛擬機器,
Time of Update: 2016-06-20
class Courier{public $name;public function __construct($name){$this->name=$name;}} 自動載入的實現 public function __autoload($calssname){ include strtolower($classname).'.'.'class.php'; } $a= new Courier('qq'); 上面兩個檔案一個是在