下載的文件總是html代碼的原因找到了,我的代碼:function downFile($filepath){
header('Content-Disposition: attachment; filename='.basename($filepath));
header('Content-Length:'.filesize($filepath));
readfile($filepath);
}
如果沒(méi)有正確的設(shè)置content-length的值就會(huì)出現(xiàn)那種情況。。
header('Content-Disposition: attachment; filename='.basename($filepath));
header('Content-Length:'.filesize($filepath));
readfile($filepath);
}
如果沒(méi)有正確的設(shè)置content-length的值就會(huì)出現(xiàn)那種情況。。
mkdir 要用到兩次。
copy folderA to folderB
//--todo mkdir("folderA");mkDir("dolderA/folderB");
copy folderA to folderB
//--todo mkdir("folderA");mkDir("dolderA/folderB");
2016-10-02
取后綴為什么不用 pathinfo($filenName,PATHINFO_EXTENSION)
2016-10-01