2009-05-13

動態輸出的swf,不能被 flash player 10 載入?

原來是 flash player 10 在搞鬼 ,當header 有 Content-Disposition: attachment 時,flash player將放棄載入。我的用法如下:

//php

if ( !$_SERVER["HTTP_X_FLASH_VERSION"] ){
header('Content-disposition: attachment; filename='.basename($openswf));
}


'asp

IF Request.ServerVariables("HTTP_X_FLASH_VERSION") = "" THEN
Response.AddHeader "content-disposition", "attachment; filename="&filename
END IF



參考連結:Understanding the security changes in Flash Player 10 Adobe Developer Connection

2009-04-22

如何用js去讀取客端檔案大小,而不會出現安全性警告

如何用js去讀取客端檔案大小,而不會出現安全性警告

//js語法
function getFileSize(filePath){
  var image=new Image();
  image.dynsrc=filePath;
  alert(image.fileSize);
}

參考:关于javascript判断文件大小 - 站长学院: ""

2009-03-06

在float底下 text-align 對齊文字的用法

在float底下 text-align 對齊文字的用法

#mainblock {

text-align:-moz-center;/*FF*/

#text-align:center;/*IE*/

}


參考:LVCHEN 的美國生活指南: Firefox 真是愛找麻煩啊