Time of Update: 2016-07-28
參考文章:[http://www.2cto.com/os/201305/208921.html][6]1、下載新的nginx包下載地址:[http://nginx.org][6]2、將nginx放到/usr/src目錄下3、編譯新的nginxtar zxvf nginx-1.10.1.tar.gzcd nginx-1.10.1.tar.gz./configure --prefix=/usr/local/nginx
Time of Update: 2016-07-28
PHP電商購物車———封裝資料庫操作類 建立了資料庫後,我們還是封裝一個資料庫的操作類吧(參考自付老師寫的那個Mypdo,本文後再附加一篇PDO總結在學習總結模組)。 if(file_exists(_DIR_.'db.ini')){ $ini = parse_ini_file('db.ini'); $dsn = $ini['db']
Time of Update: 2016-07-28
Component.onCompleted: {var x = new XMLHttpRequest(); x.onreadystatechange =function() {if(x.readyState == 4) { if(x.status == 200) { console.log("伺服器傳回值: " + x.responseText); }
Time of Update: 2016-07-28
一、有關nginx伺服器及反向 Proxy 請參考我的上一篇博文點擊開啟連結二、nginx 和uwsgi的配置 環境:ubuntu 1. 安裝ngin和wsgi服務 安裝nginx sudo apt-get install nginx 安裝wsgipip install uwsgi注意:1) 如果安裝nginx出現如下錯誤(E:無法獲得鎖 /var/lib/dpkg/lock -open),則輸入下面的命令sudo rm /var/lib/
Time of Update: 2016-07-28
PHP架構之ThinkPHP 1.介紹 ThinkPHP是一個免費開源,快速,簡單的物件導向的輕量級PHP開發架構,遵循Apache2開源的許可協議發布,為了敏捷web應用開發和簡化企業級應用開發而誕生的. ThinkPHP借鑒了國外很多的優秀的架構和模式,例如使用了物件導向的開發結構和MVC理念,採用了單一入口模式,融合了Struts和Action思想和JSP的TagLib,RoR的ORMyingshe he
Time of Update: 2016-07-28
#user nobody;worker_processes 1;#error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;#error_log /usr/local/var/log/nginx/error.log warn;#pid logs/nginx.pid;#pid /usr/local/var/run/nginx.pid;events
Time of Update: 2016-07-28
前言我也是一個偶然的機會,接觸到swoole,自那之後,就開始癡迷於swoole對於PHP開發中帶來的便利性以及效能的最佳化。那是一個風高月黑的夜晚,辛苦了一個月,用PHP寫了一個基於socket的聊天室(客服系統),前期也經過了多次測試,基本沒問題,可是就在那個漆黑的夜晚才發現,這種方式寫出來的聊天室,根本頂不住十多個人以上同時聊天,於是就淚奔了十多分鐘。然後找度娘,度娘告訴我,這世上還有個叫swoole的東西,或許可以救你…………廢話到此為止,說正題。swoole是什麼').addClass
Time of Update: 2016-07-28
1、Redis前端緩衝的PHP指令碼來自:http://www.shenbogame.com.com/wordpress-with-redis-as-a-frontend-cache/ for setup and configuration see more here: www.jeedo.net/lightning-fast-wordpress-with-nginx-redis/ use this script at your own risk. i
Time of Update: 2016-07-28
由於結果快充滿一頁了,所以先記錄下吧~! First Php三好少年';//11/* * 1,echo沒有傳回值,可以輸出多個字串,逗號隔開~ * 2,Print總返回1,只能輸出一個字串~ * 3,單引號只能輸出字串,雙引號能輸出變數~ * 4,var_dump這個犀利啊,能監測變數類型,並輸出值. * 5,數組元素可以不同類型,這個文法也是沒誰了.*/$cars = array("Volvo","BMW","TOYOTA",5);echo "字串1","字串2",
Time of Update: 2016-07-28
SELECT COUNT(logb.id) FROM rm_operate_logWHERE CONCAT( DATE_FORMAT(create_date, '%Y%m%d%H-'), IF ( DATE_FORMAT(create_date, '%i') > 30, 1, 0 ) ) = CONCAT( DATE_FORMAT(NOW(), '%Y%m%d%H-'), IF (DATE_FORMAT(NOW(), '%i')
Time of Update: 2016-07-28
對應網頁需填寫 html>html>head> meta charset="UTF-8"> title>網頁title> script>document.cookie='resolution='+Math.max(screen.width,screen.height)+'; path=/';script>//重要head>body>body>html>隱藏路由的檔案裡需要添加 RewriteEngine OnRewriteCond
Time of Update: 2016-07-28
functionlogging() {var x = new XMLHttpRequest(); x.onreadystatechange =function() {if(x.readyState == 4) { if(x.status == 200) { console.log("The server replied with:
Time of Update: 2016-07-28
'1.1-4.6','1' => '1.2-33.7','2' => '1.3','3' => '1.4-30','4' => '15-44','5' => '1.1-4.6','6' => '1.2-33.7','7' => '1.3','8'
Time of Update: 2016-07-28
Second Php29,"C羅"=>31,"貝爾"=>26);function NormalarrToStr($arr){ $r = ""; for ($x = 0; $x $xValue){ $r = $r . " " . "[$xValue]$x"; } return $r;}echo "排序前:",NormalarrToStr($names),"";sort($names);echo "排序後:",NormalarrToStr($names),""
Time of Update: 2016-07-28
之前一直是用$_SERVER[”]數組來擷取URL中的具體資訊,今天發現了這個函數更為簡單強大。$Url = "http://username:password@baidu.com/OPP/?username=admin&password=admin"; $Url = parse_url($Url); echo""; var_dump($Url); echo"";運行結果array(6) { ["scheme"]=> string(4)
Time of Update: 2016-07-28
Thinkphp的curd操作的返回值1. Creat:add()增加資料成功返回:當主鍵是自增時,返回的是剛增加的主鍵,其他則返回1失敗返回:當資料非法時,返回的是false2.
Time of Update: 2016-07-28
#判斷移動端,跳轉轉到m.aaa.comif ($http_user_agent~* (mobile|nokia|iphone|ipad|android|samsung|htc|blackberry)) { rewrite ^/(.*)$http://m.aaa.comredirect;#這裡隨意使用,這一行代表網域名稱欄會跳轉到m.aaa.com#proxy_pass
Time of Update: 2016-07-28
在實際測試中php讀取json數組時 使用簡單的 if 或者 array_key_exists 去判斷對象是否存在是會報錯的,以下是google搜尋的正確判斷方法實際上出現報錯只是我對php還不是很精通 因此可能我認為正確的判斷方法同樣不是最完美的解決方案甚至是錯誤的 此篇博文留作自用錯誤碼:$structure = imap_fetchstructure($connection, $id, FT_UID);if (array_key_exists('parts', $structure)){}
Time of Update: 2016-07-28
使用YUM安裝nginx非常方便。只需要簡單的配置就可以啦!第一步,配置nginx源在/etc/yum.repos.d/目錄下建立一個源設定檔nginx.repo: cd /etc/yum.repos.d/ vim nginx.repo填寫下面的內容:[nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/releasever/basearch/ gpgcheck=0 enabled=1儲存,則會產生一個/
Time of Update: 2016-07-28
nginx-1.10codeigniter-3.01. nginx.confserver { listen 80; server_name localhost; root D:/wnmp/www; #charset koi8-r; #access_log logs/host.access.log main; location / { #root