Time of Update: 2016-07-29
首先改一下php的設定檔:這裡主要該兩個地方:Cirl + F 尋找到mysql.dll然後去掉前面的";"然後是修改路徑:Cirl + F 尋找到extension_dir然後改掉後面的路徑,因人而異,最後的路徑修改為php的安裝路徑/ext如:博主的php安裝路徑為:F:\wwwsever\php-5.3.4則:關於Navicat for
Time of Update: 2016-07-29
data-id="1190000005008433" data-license="cc">1、在app/etc/config.php中添加自訂的模組(magento1聲明模組是在app/etc/modules): 'Silk_Helloworld' =>1,值為1,開啟模組,類似true,0關閉模組2、建立module.xml:app/code/Silk/Helloworld/etc/module.xml
Time of Update: 2016-07-29
本文執行個體講述了Joomla實現組件中彈出一個模式(modal)視窗的方法。分享給大家供大家參考,具體如下:最關鍵的JS在 /media/system/js/modal.js
Time of Update: 2016-07-29
data-id="1190000005009304" data-license="cc">1、在Girid.php添加:$this->addColumn('image',array( 'header' => Mage::helper('employee')->__('Image'), 'align' => 'center', 'index' => 'image',/*資料庫中儲存圖片的欄位名稱*/ 'renderer'
Time of Update: 2016-07-29
過濾html標籤在php中可以有內建的函數了,但它過濾的太乾淨了,我們就整理了一下些利用正則來過濾指定html標籤的例子,具體如下所示。採集的時候有時候需要過濾掉多餘的標籤屬性,比如 img標籤過濾掉除了src屬性之外的所有屬性例如刪除titile alt等屬性以及一些腳的onclick屬性等。例如過濾除了src之外的所有屬性:複製代碼 代碼如下:$str= preg_replace('/\s(?!src)[a-zA-Z]+=[\'\"]{1}[^\'\"]+[\'\"]{1}/iu',
Time of Update: 2016-07-29
本文執行個體講述了Joomla使用Apache重寫入模式的方法。分享給大家供大家參考,具體如下:開啟“使用Apache的重寫入模式:mod_rewrite”你要先做兩件事,否則你的網站將不能正常使用。將Joomla安裝目錄下的htaccess.txt檔案重新命名為.htaccess方法1:如何你使用windows系統,那麼安裝notepad++,然後用他開啟htaccess.txt,另存新檔.htaccess。方法2:開始 - 運行 - 輸入"cmd"
Time of Update: 2016-07-29
在PHP的生命週期的各個階段,一些與服務相關的操作都是通過SAPI介面實現。 這些內建實現的物理位置在PHP源碼的SAPI目錄。這個目錄存放了PHP對各個伺服器抽象層的代碼, 例如命令列程式的實現,Apache的mod_php模組實現以及fastcgi的實現等等。在各個伺服器抽象層之間遵守著相同的約定,這裡我們稱之為SAPI介面。 每個SAPI實現都是一個_sapi_module_struct結構體變數。(SAPI介面)。
Time of Update: 2016-07-29
Closure 類:匿名函數(在 PHP 5.3 中被引入)會產生這個類型的對象。 可將該類綁定到類或者對象上,即將自訂的方法動態添加到類或者對象上php7之前使用的方法Closure::bind :複製一個閉包,綁定指定的$this對象和類範圍。這個方法是 Closure::bindTo() 的靜態版本Closure::bindTo :複製當前閉包對象,綁定指定的$this對象和類範圍。建立並返回一個 匿名函數,
Time of Update: 2016-07-29
錯誤1:nginx: [emerg] mkdir() "/var/tmp/nginx/client/" failed (2: No such file or directory)[root@localhost nginx-1.6.2]# nginxnginx: [emerg] mkdir() "/var/tmp/nginx/client/" failed (2: No such file or directory)目錄不存在 或許可權的問題 下面我們建立一下[root@localhost
Time of Update: 2016-07-29
本篇的主題是
Time of Update: 2016-07-29
1. 下載源碼:$ cd /usr/downloads$ wget -c http://nginx.org/download/nginx-1.8.1.tar.gz$ tar -xvf nginx-1.8.1.tar.gz$ cd nginx-1.8.12. 安裝依賴:pcre1) 首次嘗試安裝$ cd ..$ wget -c ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.21.tar.gz$ tar -xvf
Time of Update: 2016-07-29
最近要搭建nginx伺服器和ftp服務nginx伺服器線上安裝 $sudo apt-get install nginx安裝nginx依賴包運行命令: sudo apt-get install libssl-dev sudo apt-get install libpcre3 libpcre3-dev啟動Nginx $sudo /etc/init.d/nginx startubuntu 14.04 安裝vsftpd提示530 Login incorrectftp localhost
Time of Update: 2016-07-29
/** * PHP Class for queue * @author yangqijun@live.cn * @copyright DataFrog Beijingbei Ltd. 2011-07-25 */classQueue {public$length=12; //預設隊列,相當於初始化隊列public$queue = array(); // if String like this "22,23,24" convert to array to
Time of Update: 2016-07-29
1.php函數傳遞參數的方式,到底是傳遞變數的地址還是傳遞變數的值;1.1定義一個類class Penson{public $age;public $name;}//執行個體化一個對象$zs=new Penson();$zs->age=10;1.2 分別定義一個字串,數字,數組;$str="string";$num="0";$myArray=(10,100,100);1.3定義一個函數funtion test($str,$num,$arr,$obj){$str="change
Time of Update: 2016-07-29
yii2 記錄角色的注意事項今天寫 yii2 的 RBAC 應用,打算簡單修改原有關於角色的記錄,就能切換到新的許可權,然後出現了這麼個錯誤:unserialize(): Error at offset 36 of 127 bytes排除了許可權結構(許可權名稱、角色名稱、使用的 authManager
Time of Update: 2016-07-29
//////////////////////php代碼部分public function snoopy() { require_once APP_PATH . 'Home/Model/Snoopy.class.php'; //include 'Home/Model/Snoopy.class.php'; //載入Snoopy類 $snoopy = new \Snoopy(); //執行個體化一個對象
Time of Update: 2016-07-29
如果PHP語句放在一個HTML檔案中,它是不會被處理的。但是,如果使用require()語句載入這個HTML檔案,檔案內的任何PHP命令都會被調用。因此,可以使用任何副檔名來命名包含檔案,但要遵循一個約定,例如將副檔名命名為.inc或.php是一個很好的辦法。若不用.php副檔名命名,需要將待引入檔案放置於文檔樹之外,避免使用者在瀏覽器中直接載入後以文本形式查看原始碼。若副檔名為.php,但只包含部分頁面或指令碼,此時可能會引起錯誤。注意:無論副檔名採用哪一種,待引入的檔案中PHP代碼必須放置在
Time of Update: 2016-07-29
As of 5.2, routes.php is by default already called in the context of a [‘middleware’=>’web’] by RouteServiceProvider. But in routes.php default generation of auth routes, the Route::group call is still happening by default - so if you delete that
Time of Update: 2016-07-29
mac環境下配置sublime3 的 php調試 在功能表列下 tools >> Build System >> New Build System 在彈出的檔案中內容如下:{ "cmd": ["/usr/local/php7/bin/php", "$file"], "file_regex": "^(...*?):([0-9]*):?([0-9]*)", "selector":
Time of Update: 2016-07-29
基礎快速再看一下,然後每天有新的好玩的看。這本書,反正好評不少,就是`PHP和MySQL Web開發`,機械工業出版社,澳洲人寫的,紅皮,有興趣的可以看一下。第一篇 使用PHP一、入門5分鐘翻一下,兩個點吧。 1 php 2// 3//From Bible 4//Session1 Based 5// 6// 7 8//Chapter1-Use 9namespace Bible\Basic\Using;1011//引用操作符12//這樣子賦值的變數享有同一個空間13$a=3;14echo$a;