g3에서 사용된 $write[wr_file1]를 g4로 바꾸려면 어떻게 하나요? 정보
질문 g3에서 사용된 $write[wr_file1]를 g4로 바꾸려면 어떻게 하나요?
본문
root님 - 겔러리형식 게시판 B형(GD적용) -
http://sir.co.kr/?doc=bbs/gnuboard.php&bo_table=skin3&wr_id=9444
스킨 gbdelete.skin.php파일에 있는 아래 소스를 g4용으로 바꾸려면 어떻게 해야하나요?
================================================================
// 파일삭제시에 thumb 파일도 삭제
@unlink("./data/file/$bo_table/$write[wr_file1].thumb");
================================================================
http://sir.co.kr/?doc=bbs/gnuboard.php&bo_table=skin3&wr_id=9444
스킨 gbdelete.skin.php파일에 있는 아래 소스를 g4용으로 바꾸려면 어떻게 해야하나요?
================================================================
// 파일삭제시에 thumb 파일도 삭제
@unlink("./data/file/$bo_table/$write[wr_file1].thumb");
================================================================
댓글 전체
그누야님//
/bbs/delete.php 파일 이부분 삭제하시고
sql_query(" delete from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ");
delete.skin.php에 추가 하시면 됩니다.
$sql2 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$write[wr_id]' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file].Thum");
sql_query(" delete from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$write[wr_id]' ");
/bbs/delete.php 파일 이부분 삭제하시고
sql_query(" delete from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ");
delete.skin.php에 추가 하시면 됩니다.
$sql2 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$write[wr_id]' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file].Thum");
sql_query(" delete from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$write[wr_id]' ");
안됩니다. ㅠ.ㅠ
흑흑흑~~~!
흑흑흑~~~!
아마도 bbs/delete.php에 있는 삭제루틴을 그대로 사용하셔야 할듯 합니다.
** 다음은 bbs/delete.php의 참고할 소스
// 업로드된 파일이 있다면 파일삭제
$sql2 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
** 위 소스 카피해서 적용할곳에 붙여넣기 하셔서 다음수정하시면 될듯합니다.
// 업로드된 파일이 있다면 파일삭제
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file].thumb");
ps.. 테스트를 해봐야하는데 테스트를 해볼 상황이 안되는군요.
** 다음은 bbs/delete.php의 참고할 소스
// 업로드된 파일이 있다면 파일삭제
$sql2 = " select * from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
** 위 소스 카피해서 적용할곳에 붙여넣기 하셔서 다음수정하시면 될듯합니다.
// 업로드된 파일이 있다면 파일삭제
$sql2 = " select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file].thumb");
ps.. 테스트를 해봐야하는데 테스트를 해볼 상황이 안되는군요.
/bbs/delete.php: @unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]");
라고 기재가 되어 있습니다.
빗겨나간 덧글일수도 있는데요.
파일정보는 g4_board_file이라는 테이블에 저장되어 있는 관계로
bf_file의 필드를 제어하셔야 할 것 같습니다.
업로드 파일의 소스를 직접 제어하시려면 bf_source 필드(값)을
제어하셔야 될 것 같구요.
라고 기재가 되어 있습니다.
빗겨나간 덧글일수도 있는데요.
파일정보는 g4_board_file이라는 테이블에 저장되어 있는 관계로
bf_file의 필드를 제어하셔야 할 것 같습니다.
업로드 파일의 소스를 직접 제어하시려면 bf_source 필드(값)을
제어하셔야 될 것 같구요.