//version 0.98
[.과 ..표시 없애기]
if ($listline["dirfilename"] == "." || $listline["dirfilename"] == "..") { return ""; }
elseif (substr($rawlistline,0,5) == "total") { return ""; }
includes/browse.inc.php line 456라인 주변에 위의 스크립트를 찾아서 아래와 같이 바꿀것.
if (substr($listline["dirfilename"],0,1) == ".") { return ""; }
elseif (substr($rawlistline,0,5) == "total") { return ""; }
[다운로드시 파일명이 index.php로 변하는 버그]
include/filesystem.inc.php line 1360라인 주변의 ftp_downloadfile함수를 주석처리하고 아래 함수로 교체할 것.
function ftp_downloadfile($directory, $entry) {
global $net2ftp_globals, $net2ftp_result, $net2ftp_settings;
$conn_id = ftp_openconnection();
if ($net2ftp_result["success"] == false) { return false; }
// Decrypt password
if (isset($_SESSION["net2ftp_password_encrypted_" . $net2ftp_globals["ftpserver"] . $net2ftp_globals["username"]]) == true) {
$net2ftp_password = decryptPassword($_SESSION["net2ftp_password_encrypted_" . $net2ftp_globals["ftpserver"] . $net2ftp_globals["username"]]);
} else {
$net2ftp_password = decryptPassword($net2ftp_globals["password_encrypted"]);
}
// Direct download
header("Content-type: application/force-download");
header("Content-Transfer-Encoding: Binary");
header("Content-disposition: attachment; filename=\"".$entry."\"");
readfile("ftp://".$net2ftp_globals["username"].":".
$net2ftp_password."@".
$net2ftp_globals["ftpserver"].":".
$net2ftp_globals["ftpserverport"].
$directory.$entry);
return false;
}
[참고] net2ftp
[.과 ..표시 없애기]
if ($listline["dirfilename"] == "." || $listline["dirfilename"] == "..") { return ""; }
elseif (substr($rawlistline,0,5) == "total") { return ""; }
includes/browse.inc.php line 456라인 주변에 위의 스크립트를 찾아서 아래와 같이 바꿀것.
if (substr($listline["dirfilename"],0,1) == ".") { return ""; }
elseif (substr($rawlistline,0,5) == "total") { return ""; }
[다운로드시 파일명이 index.php로 변하는 버그]
include/filesystem.inc.php line 1360라인 주변의 ftp_downloadfile함수를 주석처리하고 아래 함수로 교체할 것.
function ftp_downloadfile($directory, $entry) {
global $net2ftp_globals, $net2ftp_result, $net2ftp_settings;
$conn_id = ftp_openconnection();
if ($net2ftp_result["success"] == false) { return false; }
// Decrypt password
if (isset($_SESSION["net2ftp_password_encrypted_" . $net2ftp_globals["ftpserver"] . $net2ftp_globals["username"]]) == true) {
$net2ftp_password = decryptPassword($_SESSION["net2ftp_password_encrypted_" . $net2ftp_globals["ftpserver"] . $net2ftp_globals["username"]]);
} else {
$net2ftp_password = decryptPassword($net2ftp_globals["password_encrypted"]);
}
// Direct download
header("Content-type: application/force-download");
header("Content-Transfer-Encoding: Binary");
header("Content-disposition: attachment; filename=\"".$entry."\"");
readfile("ftp://".$net2ftp_globals["username"].":".
$net2ftp_password."@".
$net2ftp_globals["ftpserver"].":".
$net2ftp_globals["ftpserverport"].
$directory.$entry);
return false;
}
[참고] net2ftp
댓글
댓글 쓰기