360doc--好亂非常亂的文章
360doc--好亂非常亂的文章
http://www.hbhlny.cn/rssperson/36761331.aspx
360doc (http://www.hbhlny.cn)
zh-cn
360doc--個人圖書館
-
mysql中,索引,主鍵,唯一索引,聯(lián)合索引的區(qū)別
http://www.hbhlny.cn/content/16/1012/15/36761331_597861502.shtml
2016/10/12 15:11:20
mysql中,索引,主鍵,唯一索引,聯(lián)合索引的區(qū)別索引是一種特殊的文件(InnoDB數(shù)據(jù)表上的索引是表空間的一個組成部分),它們包含著對數(shù)據(jù)表里所有記錄的引用指針。上面的id和name字段組合起來就是你test表的復(fù)合主鍵 (若其一為單索引字段時,左邊的id才會有索引)它的出現(xiàn)是因為你的name字段可能會出現(xiàn)重名,所以要加上ID字段這樣就可以保證你記錄的唯一性 一般情況下,主鍵的字段長度和字段數(shù)目要越少越好。
-
請寫一個函數(shù)驗證電子郵件的格式是否正確
http://www.hbhlny.cn/content/16/1012/14/36761331_597847586.shtml
2016/10/12 14:17:35
請寫一個函數(shù)驗證電子郵件的格式是否正確function checkEmail($email) {$pregEmail = ''/([a-z0-9]*[-_/.]?[a-z0-9]+)*@([a-z0-9]*[-_]?[a-z0-9]+)+[/.][a-z]{2,3}([/.][a-z]{2})?/i'';return preg_match($pregEmail,$email);
-
PHP Session的生存周期與用法詳解
http://www.hbhlny.cn/content/16/0925/20/36761331_593581223.shtml
2016/9/25 20:12:57
通常情況下,session 在會在這幾種情況下被刪除,一是使用 session_destroy() 重置函數(shù)手動刪除,二是 session 的上次活動時間距離當前時間的間隔超過了 session 的超時設(shè)置的時間,三是服務(wù)器進程被停止.session_register():注冊session變量。session_distroy(): 銷毀所有session變量(所有session變量銷毀)3.函數(shù)session_unregister()與上面函數(shù)用法完全相同,但功能相反,上面函數(shù)是注冊session變量,而其則是刪除指定的session變量.
-
PHP記錄和讀取JSON格式日志文件
http://www.hbhlny.cn/content/16/0925/20/36761331_593581022.shtml
2016/9/25 20:12:15
PHP記錄和讀取JSON格式日志文件。//讀取日志 public function readLog($filename){ if(file_exists($filename)){ $content = file_get_contents($filename); $json = json_decode(''[''.$content.'']'',true); }else{ $json = ''{''msg'':''The file does not exist.''}''; } return $json; } }
-
瀏覽器退出之后php還會繼續(xù)執(zhí)行么?
http://www.hbhlny.cn/content/16/0925/20/36761331_593580943.shtml
2016/9/25 20:11:58
那么就意味著瀏覽器關(guān)閉以后,服務(wù)端的php還是會繼續(xù)運行的?ignore_user_abort.1 connection status: 0abort:02 connection status: 0abort:02 connection status: 1abort:12 connection status: 1abort:12 connection status: 1abort:12 connection status: 1abort:12 connection status: 1abort:12 connection status: 1abort:12 connection status: 1abort:12 connection status: 1abort:12 connection status: 1abort:1.
-
簡單介紹PHP面向?qū)ο?/title>
http://www.hbhlny.cn/content/16/0925/20/36761331_593580866.shtml
2016/9/25 20:11:40
//public function __construct(){} PHP不支持 C++、java 形式上的方法重載。$lycClass = new PhpClass(''lyc'');繼承: 在PHP中子類可以繼承父類的所有public和protected修飾的成員變量和方法,包括構(gòu)造方法。public function right1($arg){public function right2($arg1,$arg2){public function left1($arg){public function left2($arg1,$arg2){$lyc->left(''LEFT'',''LYC'');$lyc->right(123,''LYC'');$lyc->right(123,''lyc'',''right'');
-
redis并發(fā)有關(guān)問題
http://www.hbhlny.cn/content/16/0925/20/36761331_593580806.shtml
2016/9/25 20:11:25
/** * @desc 釋放鎖 * * @param key string | 加鎖的字段 * @param newExpire int | 加鎖的截止時間 * * @return bool | 是否釋放成功 */ public function releaseLock($key, $newExpire) { $lockCacheKey = $this->getLockCacheKey($key); if ($newExpire >= time()) { return $this->objRedis->del($lockCacheKey); } return true; }}
-
mysql數(shù)據(jù)庫主從同步復(fù)制原理
http://www.hbhlny.cn/content/16/0925/20/36761331_593580745.shtml
2016/9/25 20:11:09
mysql數(shù)據(jù)庫主從同步復(fù)制原理。3、slave端的IO線程在接收到master端IO返回的信息后,將接收到的binlog日志內(nèi)容依次寫入到slave端的relaylog文件(mysql-relay-bin.xxxxxx)的最末端,并將讀取到的master端的binlog文件名和pos節(jié)點位置記錄到master-info(該文件存在slave端)文件中,以便在下一次讀取的時候能夠清楚的告訴master“我需要從哪個binlog文件的哪個pos節(jié)點位置開始,請把此節(jié)點以后的日志內(nèi)容發(fā)給我”。
-
Apache與Nginx的優(yōu)缺點比較
http://www.hbhlny.cn/content/16/0925/20/36761331_593580683.shtml
2016/9/25 20:10:53
Apache與Nginx的優(yōu)缺點比較。3、Nginx 配置簡潔, Apache 復(fù)雜 Nginx 靜態(tài)處理性能比 Apache 高 3倍以上 Apache 對 PHP 支持比較簡單,Nginx 需要配合其他后端用 Apache 的組件比 Nginx 多 現(xiàn)在 Nginx 才是 Web 服務(wù)器的首選。apache對php等語言的支持很好,此外apache有強大的支持網(wǎng)路,發(fā)展時間相對nginx更久,bug少但是apache有先天不支持多核心處 理負載雞肋的缺點,建議使用nginx做前端,後端用apache。
-
php mysql SQL注入語句構(gòu)造
http://www.hbhlny.cn/content/16/0925/20/36761331_593580587.shtml
2016/9/25 20:10:32
$q = ''select id,group_id from $user_table where username=''$username'' and password=''$password'''';$q = ''select id,group_id from $user_table where username=''$username'' and password=''$password''''中。對于select * from $user_table where username=''$username'' and password=''$password''這樣的語句改造的方法有:select id,group_id from $user_table where username=''admin''#'' and password=''$password''''
-
服務(wù)器負載均衡
http://www.hbhlny.cn/content/16/0925/19/36761331_593574773.shtml
2016/9/25 19:46:10
服務(wù)器負載均衡。IP負載均衡。在負載均衡服務(wù)器收到客戶端的IP包的時候,會修改IP包的目標IP地址或端口,然后原封不動地投遞到內(nèi)部網(wǎng)絡(luò)中,數(shù)據(jù)包會流入到實際Web服務(wù)器。DNS負載均衡也是比較常用的。DNS/GSLB負載均衡 我們常用的CDN(Content Delivery Network,內(nèi)容分發(fā)網(wǎng)絡(luò))實現(xiàn)方式,其實就是在同一個域名映射為多IP的基礎(chǔ)上更進一步,通過GSLB(Global Server Load Balance,全局負載均衡)按照指定規(guī)則映射域名的IP。
-
PHP CURL實現(xiàn)帶有驗證碼網(wǎng)站的模擬登錄的方法
http://www.hbhlny.cn/content/16/0925/19/36761331_593574561.shtml
2016/9/25 19:45:15
-
TTP 中GET 與POST 的區(qū)別
http://www.hbhlny.cn/content/16/0925/19/36761331_593574467.shtml
2016/9/25 19:44:50
TTP 中 GET 與 POST 的區(qū)別。最直觀的區(qū)別就是GET把參數(shù)包含在URL中,POST通過request body傳遞參數(shù)。GET請求在URL中傳送的參數(shù)是有長度限制的,而POST么有。所以GET和POST的底層也是TCP/IP,也就是說,GET/POST都是TCP鏈接。HTTP給汽車運輸設(shè)定了好幾個服務(wù)類別,有GET, POST, PUT, DELETE等等,HTTP規(guī)定,當執(zhí)行GET請求的時候,要給汽車貼上GET的標簽(設(shè)置method為GET),而且要求把傳送的數(shù)據(jù)放在車頂上(url中)以方便記錄。
-
HTTPS 工作原理和TCP 握手機制
http://www.hbhlny.cn/content/16/0925/19/36761331_593574369.shtml
2016/9/25 19:44:27
而當對方回應(yīng)ACK報文后,則進入到FIN_WAIT_2狀態(tài),當然在實際的正常情況下,無論對方何種情況下,都應(yīng)該馬上回應(yīng)ACK報文,所以FIN_WAIT_1狀態(tài)一般是比較難見到的,而FIN_WAIT_2狀態(tài)還有時常??梢杂胣etstat看到。正常情況下,當你發(fā)送FIN報文后,按理來說是應(yīng)該先收到(或同時收到)對方的ACK報文,再收到對方的FIN報文。但是CLOSING狀態(tài)表示你發(fā)送FIN報文后,并沒有收到對方的ACK報文,反而卻也收到了對方的FIN報文。
-
DOM(文檔對象模型(DocumentObjectModel))
http://www.hbhlny.cn/content/16/0925/00/36761331_593401766.shtml
2016/9/25 0:20:24
DOM(文檔對象模型(Document Object Model))—搜狗搜索旗下的百科產(chǎn)品。DOM=DocumentObjectModel,文檔對象模型,DOM可以以一種獨立于平臺和語言的方式訪問和修改一個文檔的內(nèi)容和結(jié)構(gòu)。Dom技術(shù)使得用戶頁面可以動態(tài)地變化,如可以動態(tài)地顯示或隱藏一個元素,改變它們的屬性,增加一個元素等,Dom技術(shù)使得頁面的交互性大大地增強。DOM被分為不同的部分(核心、XML及HTML)和級別(DOMLevel1/2/3): 什么是 DOM?
-
數(shù)據(jù)庫基本_SQL語句大全
http://www.hbhlny.cn/content/07/0228/21/10340_379741.shtml
2016/9/24 22:44:58
選擇:select * from table1 where 范圍。select a.title,a.username,b.adddate from table a,(select max(adddate) adddate from table where table.title=a.title) b.delete from table1 where not exists ( select * from table2 where table1.field1=table2.field1.select top 10 b.* from (select top 20 主鍵字段,排序字段 from 表名 order by 排序字段 desc) a,表名 b where b.主鍵字段 = a.主鍵字段 order by a.排序字段。