안녕하세요
관리자 프론트에서 게시판 을 삭제할경우 해당게시판 에디터에서 등록된 이미지파일을 같이 모두 삭제 처리 해줘야할경우 다운받으셔서 업데이트 해주시기 바랍니다.
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개
게시글 목록
| 번호 | 제목 |
|---|---|
| 24318 | |
| 24317 | |
| 24315 | |
| 24309 | |
| 24294 | |
| 24293 | |
| 24277 | |
| 24262 | |
| 24260 | |
| 24253 | |
| 24251 | |
| 24236 | |
| 24233 | |
| 24228 | |
| 24226 | |
| 24221 | |
| 24214 | |
| 24203 | |
| 24201 | |
| 24199 | |
| 24196 | |
| 24195 | |
| 24194 | |
| 24192 | |
| 24191 | |
| 24187 | |
| 24185 | |
| 24183 | |
| 24172 | |
| 24168 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기