context 欄位數性必須設為 BLOB
CREATE TABLE `Sample`
(
`id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`context`
BLOB NOT NULL
) TYPE = MYISAM ;
使用 COMPRESS function 進行字串壓縮
INSERT INTO Sample(
id, context ) VALUES (NULL , COMPRESS( 'Welcome to hello
world.' ) );
使用 UNCOMPRESS function 進行字串解壓縮
SELECT id, UNCOMPRESS(context) FROM Sample;
coolouis 發表在 痞客邦 留言(0) 人氣(30)
PHP Magic Constants: __LINE__ , __FILE__ , __FUNCTION__ , __CLASS__ , and __METHOD__
<?php
print(__FILE__);
coolouis 發表在 痞客邦 留言(0) 人氣(37)
// Autoloading Objects
function __autoload($class_name) {
require_once $class_name . '.php';
}
coolouis 發表在 痞客邦 留言(0) 人氣(26)
下面是當前規則表達式裡可用的修飾.括號內的名字是那些修飾符的內部PCRE名字.
i (PCRE_CASELESS)
如果設置了這個修飾符,則表達式不區分大小寫.
coolouis 發表在 痞客邦 留言(0) 人氣(10)
function authenticate() {
header('WWW-Authenticate: Basic realm="Test Authentication System"');
header('HTTP/1.0 401 Unauthorized');
// Text to send if user hits Cancel button
echo "You must enter a valid login ID and password to access this resource\n";
exit;
}
coolouis 發表在 痞客邦 留言(0) 人氣(40)
有四天的時間沒碰電腦了,打開 RSS Reader 瀏覽文章列表,看看最近有沒有什麼新鮮貨?發現這篇「PHP Tutorials Utopia: 13 Vital PHP skills for every novice PHP developer and solutions」,寫的很棒!作者整理了十三個主題說明 PHP 設計人員必需知道的技能和學習參考網站。
coolouis 發表在 痞客邦 留言(0) 人氣(16)