Time of Update: 2016-07-28
我們都知道在apache下可以配置訪問web伺服器的某個路徑時,自動顯示其目錄下面的檔案清單的,其實Nginx一點也不比apache弱,它當然也可以實現這個功能,而且還非常容易和簡單;主要用到autoindex 這個參數來開啟,其配置如下:複製代碼代碼如下:location / { root /data/www/file //指定實際目錄絕對路徑; autoindex on;
Time of Update: 2016-07-28
nginx限流主要是limit_conn模組和limit_req模組limit_conn 針對串連數限流,limit_req針對請求速率限流limit_conn限流http {limit_conn_zone $binary_remote_addr z/p>limit_conn_log_level error;limit_conn_status 503;server {...location /{limit_conn addr 2}limit_req 限流http {
Time of Update: 2016-07-28
首先寫前端:寫在10.html頁面上htmlxmlns="http://www.w3.org/1999/xhtml"lang="zh-CN">head>metahttp-equiv="Content-Type"content="text/html; charset=UTF-8">title>10title>metaname="description"content=""
Time of Update: 2016-07-28
以下問原創教程,想看請百度中搜尋“SharEDITor”進入網站教你成為全棧工程師(Full Stack Developer) 〇-什麼是全棧工程師(2016-04-04)教你成為全棧工程師(Full Stack Developer) 一-各顯神通總結八大類程式設計語言的區別(2016-04-06)教你成為全棧工程師(Full Stack Developer) 二-半小時學會網站開發(2016-04-08)教你成為全棧工程師(Full Stack Developer) 三-網站後端伺服器那些事(
Time of Update: 2016-07-28
直接貼代碼: "127.0.0.1", "user" => "root", "password" => "root", "dbname" => "app", "apiurl"=>"http://127.0.0.1:2348/api/v1/saveUserIPInfo" ); }else{ return array( "host" => "192.168.
Time of Update: 2016-07-28
有一周沒有寫了,我知道其實不算長,但是我的想法就是一周一篇把,不多不少,能把這周看的東西記錄一下。 上周最重大的事情就是,我實在受不了虛擬機器不能PING主機,網上說橋接的模式都是在win7模式下,但是WIN8根本橋接不了,而且網上的教程基本都是基於WIN7的,於是狠下心來重裝系統,別了WIN8,別了UBUNTU,自己折騰一晚上也沒有成功,我自己裝的話,說我系統少一個檔案,感覺有點無奈,只能找人幫我重裝系統。
Time of Update: 2016-07-28
最近使用PHP有關時間處理的頻率比較高,現在整理一下知識點。time()time() 函數返回目前時間的 Unix 時間戳記。$t=time();echo($t . "");這裡的$t對象輸出的是一個數字,這個數字表示從1970-01-01到現在共走了多少秒。感覺沒啥用啊,這時候需要使用date函數將該對象轉化為我們需要的日期了。date(format,,timestamp)date函數格式非常靈活,使用方法多種多樣,足以滿足你在開發過程中遇到的各種情況。format : 必填項,
Time of Update: 2016-07-28
html>head>metacharset="utf-8">title>三層forecachtitle>head>body>$wage = array( "大一" => array( array(1, '張', '班長', '19'), array(2, '李','學委','18'), array(3, '王','學生','19'), ), "大二" => array(
Time of Update: 2016-07-28
錯誤log配置和訪問log配置[root@slave nginx]# vi /etc/nginx/nginx.confworker_processes 1;error_log /var/log/nginx/error.log;events { worker_connections 1024;}http { include mime.types; default_type application/octet-stream; sendfile
Time of Update: 2016-07-28
php比如,今天是2102年11月2號,那麼php要擷取2102年11月2號的時間戳記是怎麼辦的呢?代碼:echostrtotime(date('Y-m-d')),''; 擷取明天淩晨的時間戳記代碼:echostrtotime(date('Y-m-d',strtotime('+1 day'))),''; 附上測試代碼:echo strtotime('2012-11-2'),'';echo strtotime('2012-11-2 00:00:00'),'';echo strtotime(
Time of Update: 2016-07-28
其實這個功能很簡單,發出來做一個備份,產生的時間可直接寫入至資料庫。publicfunctionat(){$localtime = date('Y-m-d H:i:s', time()); return$localtime; }').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering);
Time of Update: 2016-07-28
本文執行個體講述了php函數傳值的引用傳遞注意事項。分享給大家供大家參考,具體如下:Strict standards: Only variables should be passed by reference網上查到資料有這麼一句話:在php5.3以上版本會出這個問題,應該也和php的配置有關,只要把這一句拆成兩句就沒有問題了。因為array_walk的參數是引用傳遞的,5.3以上預設只能傳遞具體的變數,而不能通過函數傳回值。當然你也可以修改php.ini 裡的 error_reporting
Time of Update: 2016-07-28
平時寫項目的時候經常會碰到操作資料庫,每次操作資料庫的時候最麻煩的就是要寫一個表映射的類,根據規律總結寫了一個自動產生的小demo:// 資料庫配置參數$db_config = array( 'host' => '127.0.0.1', 'port' => 3306, 'username' => 'root', 'password' => '', 'dbname' => 'joe_db', 'charset' => 'utf8');$tablePre =
Time of Update: 2016-07-28
初學php,看一些架構,發現在一個類中,new 新類時,並沒有在本檔案中include或者require,根據需要特定的類名,就可以完成執行個體化。查看代碼後,明白,採用的是一種spl_autoload_register技術。 如下為一個簡單的
Time of Update: 2016-07-28
回複圖片、音頻、影像訊息都是需要media_id的,這個是需要將多媒體檔案上傳到伺服器才有的。將多媒體檔案上傳到伺服器,以及從伺服器下載檔案,可以參考:http://mp.weixin.qq.com/wiki/index.php?title=上傳下載多媒體檔案上傳下載多媒體檔案的方法還是寫到WeixinUtil.java中。代碼如下:import java.io.BufferedOutputStream;import java.io.BufferedReader;import java.
Time of Update: 2016-07-28
$text="字串直接下載"; $fileName="xxx.txt"; header("Content-Type: application/txt"); header("Content-Disposition: attachment; filename=".$fileName); echo $text;').addClass('pre-numbering').hide();
Time of Update: 2016-07-28
下載地址http://nginx.org/en/download.html我下載的是nginx-1.10.1版本,官方說是最新穩定版解壓到檔案夾;我解壓到D盤目錄下,並重新命名檔案夾為nginx雙擊nginx.exe啟動訪問locahost 該頁面為預設頁面,可以根據具體需求修改;1、修改預設網頁內容 - nginx/html/index.html2、修改配置路徑 -
Time of Update: 2016-07-28
Yii是什嗎? 高效能,基於組件Yii適合做什嗎? 大型應用,門戶,社區,OMS,電子商務等Yii與其他架構相比 1:和其他PHP架構相比,Yii實現了MVC(Model-View-Controller)設計模式並基於該模式組織代碼。 2:Yii代碼簡單優雅。 3:Yii是一個全棧架構,對關係型和NoSQL資料庫都提供了查詢產生器和ActiveRecord;多層緩衝支援,等等。
Time of Update: 2016-07-28
一、下載 PHP環境搭建(環境整合工具):百度搜“appserv”,然後直接下載 dreamweaver cs5 開發工具: 下載地址:http://pan.baidu.com/s/1i54jHcT二、安裝 1、appserv安裝:要注意設定服務端連接埠和資料庫密碼,其他下一步就可以了,安裝完的目錄如下: 2、dreamweaver安裝:直接開啟Adobe Dreamweaver CS5下的快速安裝,然後安裝即可。三、在dreamweaver上運行php檔案
Time of Update: 2016-07-28
/** * 檔案分頁類 */class FilePage { private $current; //當前頁 private $file; //檔案內容 private $totalPage; //總的頁數 private $url; //傳遞的參數 private $pageLen; //每頁顯示的長度/** * [__construct description] 構造方法 資料初始化 * @author lianggc 2016-06-28 * @param string