[그누보드] 첨부파일 파일명 그대로 유지하고 싶은 경우 - ftp 폴더에


bbs/write_update.php 239행 부분

//$upload[$i][file] = abs(ip2long($_SERVER[REMOTE_ADDR])).'_'.substr($shuffle,0,8).'_'.str_replace('%', '', urlencode(str_replace(' ', '_', $filename))); 
$upload[$i][file] = urlencode(str_replace(' ', '_', $filename)) // 로 수정 

123.txt 첨부시 2106262692_MIRK9m0g_123.txt 형태로 뒤쪽에 파일명.확장자 확인가능 

파일명만 남길경우 해당 영역 228행 추가 확인

$filename = preg_replace("/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i", "$0-x", $filename);
 

1 2 3 4 다음 맨끝
글쓰기