tentsy01 寫:履試不成功下又回到心靈老師介紹的網站總算發現了解決方法
代碼: 選擇全部
# ---[ OPEN ]----------
#
../pafiledb/modules/pa_download.php
#
# ---[ DELETE ]----------
#
if ( $size > ( 1048575 * 6 ) )
{
return false;
}
我也改了標題分享給可能會發生同樣問題的人
也再次感謝心靈老師指引明燈^^
另外...好像無法傳超過10M的檔案
我也改過php.ini的相關設定
目前就以在伺服器本機上傳為解決之道>_<
看來, 我又胡亂猜錯了.
依我的個人經驗,
若有較大的檔案 (3M~) 分享, 則直接利用 FTP 伺服器較適宜;
否則, 除了必須調整控制台 (pafiledb) 基本組態的設定值之外,
即使調整 php.ini 的設定值, 也恐怕不易達到預期的目標.
剛才到您的論壇, 測試下載
6100K8MB 顯卡更新DRIVER (29.3 MB)
試了幾次, 都無法完全下載. (大約只有下載 6 MB 左右)
http://bbs.jinnyoung.com.tw/dload.php?a ... file_id=20
原本我在論壇分享的檔案, 通通都只是以 '檔案網址' 的方式分享;
直到要測試您主文提到的 '路徑' 情況, 我才改以 '檔案上傳' 的方式.
--
不過, 倒也讓我發現了一個新的問題:
我的
論壇語系編碼為 utf-8, 若上傳檔案的檔名原為中文的話, 則下載後將變為 '亂碼';
這個情況, 似乎與 attach mod (附加檔案) 雷同.
因此, 我參考了
wasabi 的修改方法, 也成功修正了 '亂碼' 的問題.
以下的修改, 提供大家參考:
#
#-----[ OPEN ]-----
#
pafiledb/modules/pa_download.php
#
#-----[ FIND ]-----
#
代碼: 選擇全部
// Send out the Headers
if ( $browser_agent == 'ie' )
{
header( 'Content-Type: ' . $mimetype . '; name="' . $real_filename . '"' );
header( 'Content-Disposition: inline; filename="' . $real_filename . '"' );
}
else
{
header( 'Content-Type: ' . $mimetype . '; name="' . $real_filename . '"' );
header( 'Content-Disposition: attachment; filename=' . $real_filename );
}
#
#-----[ REPLACE WITH ]-----
#
代碼: 選擇全部
// UTF-8 參考 http://phpbb-tw.net/phpbb/viewtopic.php?p=229051#229051 因應
// Send out the Headers
if($browser_agent == 'ie') {
header('Content-Type: ' . $mimetype . '; name="' . urlencode($real_filename) . '"');
header('Content-Disposition: inline; filename="' . urlencode($real_filename) . '"');
} else {
header('Content-Type: ' . $mimetype . '; name="' . $real_filename . '"');
header('Content-Disposition: inline; filename="' . $real_filename . '"');
}
#
#-----[ SAVE & CLOSE ]-----
#