Time of Update: 2016-08-08
1.在/basic/config/console.php和/basic/config/web.php裡,配置組件,這裡只貼出console.php裡的代碼 : 'basic-console', 'basePath' => dirname(__DIR__), 'bootstrap' => ['log', 'gii'], 'controllerNamespace' =>
Time of Update: 2016-08-08
$config = array(//"config" =>"D:/phpserver/Lighttpd/openssl.cnf",//'config' =>'D:/phpStudy/Lighttpd/OpenSSL.cnf','private_key_bits' => 1024, // Size of Key.'private_key_type' => OPENSSL_KEYTYPE_RSA);//$res = openssl_pkey_new();$res = openssl_pkey_
Time of Update: 2016-08-08
ENABLING THE PHP OCI8 EXTENSION ON WINDOWSThe Instant Client binaries complement PHP's pre-built binaries for Windows.Install Apache by downloading httpd-2.2.22-win32-x86-no_ssl.msi from httpd.apache.org/download.cgiDouble click the MSI file to
Time of Update: 2016-08-08
建造者模式-建立套餐1.產品類Meal(套餐類)class Meal {private $food;private $drink;public function setFood($f) {$this->food = $f;}public function setDrink($d) {$this->drink = $d;}public function getFood() {return $this->food;}public function getDrink() {return $this->
Time of Update: 2016-08-08
1、刪除內容中的超連結ereg_replace(']*)>([^ereg_replace("]*>|","",$content); 2、消除包含特定詞的超連結$find="this string is my find";$string='替換掉了';//將超連結替換成的內容echo ereg_replace(']*)>([^]*)','\\2',$content);3、擷取超連結常值內容//方法一 preg_match_all('/[nrn]*(check
Time of Update: 2016-08-08
八 使用post傳輸資料l xmlhttp.open("post",“action.php");l xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l xmlhttp.send(data);1、 get和post請求有哪些不同?傳遞資料大小不同:Get:2kPost:原限制傳遞資料方式不同:Get:url後面
Time of Update: 2016-08-08
//thinkphp裡面同一模板內的方法調用public function a(&$txt){$txt.='hh';}public function b(){$b='bbb';$this->a($b);echo $b;//'bbbhh'}&$:地址調用public function c(){$a='hh';return $a;}public function d(){$d = $this->c();//有返回值的調用echo $d;//'hh'}
Time of Update: 2016-08-08
公司要求搭一個wiki用來寫介面文檔,於是就試著搭建了一下,失敗多次,最後終於搞好了。一、實驗環境1、作業系統:Windows72、Nginx:nginx-1.6.3.zip3、php:php-5.5.25-nts-Win32-VC11-x64.zip4、wiki:mediawiki-1.24.2.tar.gz二、配置Nginx解壓nginx-1.6.3.zip到D:\web並把檔案夾nginx-1.6.3重新命名為nginx_80。修改D:\web\nginx_80\conf\nginx.co
Time of Update: 2016-08-08
五一與姨丈的談話後,覺得還是得靜下心來做後台,於是在學習最忙的一個學期裡加入同學的一個創業團隊,跟著大神做後台。雖然有點作死,但是希望能夠堅持到最後。先簡介下各種工具zend studio -version10.6.2 編寫PHP的IDEZend framework -version 2.4.2 一個PHP的架構xmapp -version 3.2.1
Time of Update: 2016-08-08
php通過如下方式調用memcache存放session的時候,記得需要把/usr/local/php/etc/php.ini中的session.auto_start = 0 設定為0 ,否則調用memcache儲存session,是不生效的。原因是:在php執行第一行的時候回自動啟動session,而且預設的是files,所以預設就會通過檔案儲存session,而在之後配置的ini_set 就沒有用了。// session設定方式一:這種方式
Time of Update: 2016-08-08
零. 聲明:以下內容適用於linux環境下,採用源碼方式安裝Nginx官網安裝指南:http://wiki.nginx.org/InstallChs一. 下載nginx1.官網下載:http://nginx.org/en/download.html 2.Git下載:https://github.com/nginx/nginx二. 必要的依賴庫1.pcreyum -y install pcre* #nginx rewrite模組2.gccyum -y install gcc gcc-c++
Time of Update: 2016-08-08
記憶體池函數:ngx_create_poolngx_destroy_poolngx_reset_poolngx_pallocngx_pnallocngx_palloc_blockngx_palloc_largengx_pool_cleanup_add記憶體池建立ngx_pool_t * ngx_create_pool(size_t size, ngx_log_t *log) { ngx_pool_t *p; p =
Time of Update: 2016-08-08
1、 安裝建議下載openresty ,包比較全,安裝簡單方便; 下載地址 http://openresty.org/download/ngx_openresty-1.7.10.1.tar.gz2、編譯安裝tar xzvf ngx_openresty-1.7.10.1.tar.gzcd ngx_openresty-1.7.10.1./configure --with-luajitmakemake install3、修改nginx config -
Time of Update: 2016-08-08
今天準備將一個php demo放在IIS下運行,網站在IIS下的配置是這樣的:應用程式集區是整合模式下的.net framework 2.0(2.0或4.0沒什麼關係,因為php以fastCGI的方式在跑), 應用程式集區標識配置為IIS內建的NETWORKSERVICE, 使用的認證方式為匿名驗證。開啟本地的網站,訪問php頁面,
Time of Update: 2016-08-08
1、下載visual box 和 vgarant兩個 工具,安裝http://vagrantup.comhttps://www.virtualbox.org/2、添加homestead的box到vagrant3、建立一個虛擬機器組態檔git clonehttps://github.com/Swader/homestead_improved 你的目錄4、修改Homestead.yaml配置folders就是Windows的實際目錄對應的虛擬機器裡邊的目錄sites就是網站名稱對應的虛擬機器的目錄5
Time of Update: 2016-08-08
php/** * Class Rpt redis 用於報表的緩衝基本存放裝置和讀寫 2.0 * @simple * Rpt::read("diamond.account",$nick); * Rpt::readSync("diamond.account",$nick); * $finder = Rpt::createFinder("diamond.account",$nick); * $finder->read(); * $finder->readSync(); * *
Time of Update: 2016-08-08
源碼安裝nginx這裡裝nginx的三個依賴,分別是pcre、openssl、zlib 其中編譯pcre需要:yum install gcc gcc-c++ pcre-devel下載源碼包官網下載最新版即可:http://www.pcre.org/http://www.openssl.orghttp://www.zlib.net/http://nginx.org注意:這裡pcre只能是是8.0+,pcre2不支援 會報錯:make[2]: *** No rule to make target `
Time of Update: 2016-08-08
修改nginx/conf/nginx.conf,修改完後如下:user www www;worker_processes 1;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#pid logs/nginx.pid;events { worker_connections 1024;}http { include
Time of Update: 2016-08-08
數組,可以說是PHP的資料應用中較重要的一種方式。PHP的數組函數眾多,下面是一些小結,藉此記之,便於以後鑒之。 1. 數組定義 數組的定義使用 array()方式定義,可以定義空數組:$number = array(1,3,5,7,9); //定義空數組 $result = array(); $color =array("red","blue","green"); //自訂索引值 $language = (1=>"English",3=>"Chinese",5=>"Franch");
Time of Update: 2016-08-08
添加源檔案首先在src/core/目錄下添加兩個檔案,分別是my_debug.h和my_debug.c。#ifndef MY_DEBUG_LENKY_H#define MY_DEBUG_LENKY_H#include void enable_my_debug(void) __attribute__ ((no_instrument_function));void disable_my_debug(void) __attribute__ ((no_instrument_function));int