這篇文章受密碼保護,請輸入密碼後查看內容。
- Jul 15 Sun 2012 23:25
-
找回遺忘的小事
- Jul 04 Sat 2015 17:50
-
HTTP|request method淺談
HTTP Request method包含如下:
1. GET 把資料附在URI上,取得想要的資訊,限制為1024字元(GET的回應是可以被快取的)
2. POST 在body塞含機敏性的資料,傳給指定的URI做處理(一般POST不會被快取,但伺服器設定Cache-Control或Expires標頭,仍可以對POST的回應做快取)
3. OPTIONS 列出所有該Web Server 有支援的 http method
1. GET 把資料附在URI上,取得想要的資訊,限制為1024字元(GET的回應是可以被快取的)
2. POST 在body塞含機敏性的資料,傳給指定的URI做處理(一般POST不會被快取,但伺服器設定Cache-Control或Expires標頭,仍可以對POST的回應做快取)
3. OPTIONS 列出所有該Web Server 有支援的 http method
- Jan 29 Thu 2015 12:04
-
JS|cookies關掉瀏覽器不一定會真的清乾淨
每個瀏覽器都有自己的設定
有可能關掉整個瀏覽器,cookie還是在的情境發生(無言...)
不然正常來說,沒有設定expire time的cookie,關掉瀏覽器就會清掉了。
參考:http://www.dotblogs.com.tw/yc421206/archive/2013/12/13/133987.aspx
有可能關掉整個瀏覽器,cookie還是在的情境發生(無言...)
不然正常來說,沒有設定expire time的cookie,關掉瀏覽器就會清掉了。
參考:http://www.dotblogs.com.tw/yc421206/archive/2013/12/13/133987.aspx
- Jan 01 Wed 2014 22:35
-
電影|聽說桐島退社了
- Aug 29 Thu 2013 15:05
-
PHP|抓資料夾全部檔案
function awardiconIndex($lang,$id){
$content = array();
$dir = "../gamerzone/upload/award/";
if (is_dir($dir)){
$dh = opendir($dir);
chdir ($dir);
while (($file = readdir($dh)) !== false) {
if (is_dir($file) && basename($file)!='.' && basename($file)!='..'){
getDirList($file);
}
else if($this->filename($file) != "." && $this->filename($file) != ".."){
$content[] = $file;
}
}
chdir("../");
closedir($dh);
}
var_dump($content); //印出dir資料夾裡面的全部檔案
}
function filename($file)
{
$path_parts = pathinfo($file);
return basename($file, $path_parts['extension']);
}
$content = array();
$dir = "../gamerzone/upload/award/";
if (is_dir($dir)){
$dh = opendir($dir);
chdir ($dir);
while (($file = readdir($dh)) !== false) {
if (is_dir($file) && basename($file)!='.' && basename($file)!='..'){
getDirList($file);
}
else if($this->filename($file) != "." && $this->filename($file) != ".."){
$content[] = $file;
}
}
chdir("../");
closedir($dh);
}
var_dump($content); //印出dir資料夾裡面的全部檔案
}
function filename($file)
{
$path_parts = pathinfo($file);
return basename($file, $path_parts['extension']);
}
- Aug 27 Tue 2013 14:48
-
PHP|APC upload process bar
在PHP 5.4以前,实现这样的进度条并不容易,主要有三种方法:
使用Flash, Java, ActiveX
使用PHP的APC扩展
(PHP 5.4之前需要另外安裝下載php_apc_3_0_19.dll就可以使用)
使用HTML5的File API
使用Flash, Java, ActiveX
使用PHP的APC扩展
(PHP 5.4之前需要另外安裝下載php_apc_3_0_19.dll就可以使用)
使用HTML5的File API
- Aug 09 Fri 2013 17:31
-
Smarty|下拉選單1-50數字
- Jul 31 Wed 2013 18:01
-
JQ|模擬點擊
- Jul 31 Wed 2013 17:59
-
JQ|送出表單後,把表單值清空
用AJAX送出表單後,會希望將欄位裡面的值全部清空
$("form[name='pressForm']").find(":text,textarea,input").each(function() {
$(this).val("");
});
$("form[name='pressForm']").find(":text,textarea,input").each(function() {
$(this).val("");
});
- Jul 23 Tue 2013 17:11
-
PHP|把日期轉成我要的格式
在CI出現錯誤提示:
Message: A non well formed numeric value encountered
是少了
date("Y-m-d",strtotime($_GET['start_date']));
Message: A non well formed numeric value encountered
是少了
strtotimedate("Y-m-d",strtotime($_GET['start_date']));
- Jul 02 Tue 2013 11:20
-
Codeigniter|移除網址上的index.php
隱藏網址上的index.php
把以下程式加到.htaccess裡面(在application裡面可以找到此檔案)
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule^(.*)$ /index.php/$1 [L]
把以下程式加到.htaccess裡面(在application裡面可以找到此檔案)
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule^(.*)$ /index.php/$1 [L]
- Jun 07 Fri 2013 11:39
-
JQ|$("div.gallery .image img").load() 確保可以抓到圖片的高
/* get the image height */
function heightItem(){
$("div.gallery .image img").load(function(){
var height = $(this).height();
alert(height);
});
}
function heightItem(){
$("div.gallery .image img").load(function(){
var height = $(this).height();
alert(height);
});
}