안녕하세요
관리자 프론트에서 게시판 을 삭제할경우 해당게시판 에디터에서 등록된 이미지파일을 같이 모두 삭제 처리 해줘야할경우 다운받으셔서 업데이트 해주시기 바랍니다.
adm/board_list_update.php
만약
해당파일 커스텀 되어있다면? 대략 88라인
if (preg_match("/^[A-Za-z0-9_]+$/", $tmp_bo_table)) {
//여기
include './board_delete.inc.php';
}
해당부분 사이에 다음과 같이 넣어주시면됩니다.
$sql = "SELECT wr_content FROM {$g5['write_prefix']}{$tmp_bo_table}";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
preg_match_all('/\/data\/editor\/([0-9]+)\/([^\s"\'<>]+)/', $row['wr_content'], $matches);
for ($i = 0; $i < count($matches[0]); $i++) {
$folder = $matches[1][$i];
$filename = $matches[2][$i];
$editor_path = G5_DATA_PATH . "/editor/{$folder}";
$file_path = $editor_path . "/{$filename}";
if (is_file($file_path)) {
@unlink($file_path);
}
$file_ext = pathinfo($filename, PATHINFO_EXTENSION);
$file_name_no_ext = basename($filename, "." . $file_ext);
$thumbs = glob($editor_path . "/thumb-{$file_name_no_ext}_*." . $file_ext);
foreach ($thumbs as $thumb_file) {
if (is_file($thumb_file)) {
@unlink($thumb_file);
}
}
}
}
추천 많이 해주셔요~~
댓글 14개
게시글 목록
| 번호 | 제목 |
|---|---|
| 23966 | |
| 23963 | |
| 23953 | |
| 23949 | |
| 23938 | |
| 23935 | |
| 23933 | |
| 23928 | |
| 23919 | |
| 23918 | |
| 23917 | |
| 23910 | |
| 23902 | |
| 23901 | |
| 23897 | |
| 23894 | |
| 23893 | |
| 23891 | |
| 23885 | |
| 23872 | |
| 23870 | |
| 23862 | |
| 23859 | |
| 23853 | |
| 23845 | |
| 23838 | |
| 23827 | |
| 23819 | |
| 23805 | |
| 23801 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기