用header函數可不可同時下載多個文件?怎樣用? 好象不可以吧 没有用过这种方法 可以用别的方法下载多个文件嘛ftpfile都可以 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <td onclick="window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");window.open("");"> 我的代碼如下.我該如何改呢?function Download($filepath,$filename) { global $HTTP_USER_AGENT; $size = filesize($filepath.$filename); header("Content-Type: application/force-download"); header("Content-Length: $size"); if(preg_match("/MSIE 5.5/", $HTTP_USER_AGENT)) { header("Content-Disposition: filename=$filename"); } else { header("Content-Disposition: attachment;filename=$filename"); } header("Content-Transfer-Encoding: binary");} if ($ADO_Document_Rs->RecordCount>0){ while(!$ADO_Document_Rs->eof){ $FileName=$ADO_Document_Rs->Fields("FileName"); $FileContent=$ADO_Document_Rs->Fields("FileContent"); $ADO_Document_Stream->Write($FileContent); $ADO_Document_Stream->SaveToFile("C:\\temp\\".$FileName->value(),2); $strFilePath="C:\\temp\\"; $strFileName=$FileName->value(); Download($strFilePath,$strFileName); $ADO_Document_Rs->MoveNext(); } } else{ ECHO "<script language=\"JavaScript\">alert(\"此目錄沒有包含檔案\");</script>"; } php5.2.6 关于页面缓存问题,请问什么时候需要缓存网页? php中设置cookie,在linux主机中读不出,求教 俺只剩下40分了,求一段代码...急.谢谢. 看一下这个sql有没有错,userid是int类型的 HELP ME 关于SESSION的问题,在线等! 哪里有php中文手册下载? 保留价格.00 php 数组相加,看不懂,请些一个好例子给我看一下好吗 又是下載的問題!!! 請高手幫忙看一下. 请大家举一个set和enum数据类型,在php中的应用好吗?
global $HTTP_USER_AGENT;
$size = filesize($filepath.$filename);
header("Content-Type: application/force-download");
header("Content-Length: $size");
if(preg_match("/MSIE 5.5/", $HTTP_USER_AGENT)) {
header("Content-Disposition: filename=$filename");
}
else {
header("Content-Disposition: attachment;filename=$filename");
}
header("Content-Transfer-Encoding: binary");
} if ($ADO_Document_Rs->RecordCount>0){
while(!$ADO_Document_Rs->eof){
$FileName=$ADO_Document_Rs->Fields("FileName");
$FileContent=$ADO_Document_Rs->Fields("FileContent");
$ADO_Document_Stream->Write($FileContent);
$ADO_Document_Stream->SaveToFile("C:\\temp\\".$FileName->value(),2);
$strFilePath="C:\\temp\\";
$strFileName=$FileName->value();
Download($strFilePath,$strFileName);
$ADO_Document_Rs->MoveNext();
}
}
else{
ECHO "<script language=\"JavaScript\">alert(\"此目錄沒有包含檔案\");</script>";
}