답변 3개 / 댓글 1개
9년 전
현이 님의소스가 개인적으로 추천합니다
Copy
<?// Copyright 유성헌 2015-12-31$data_path = G5_DATA_PATH.'/file/'.$bo_table;$sql = " select * from g5_board_file where wr_id = '$wr_id' and bo_table = '$bo_table'";$qr = sql_query($sql);for ($i=0; $row=sql_fetch_array($qr); $i++) { $bf_file1[$i] = $row[bf_file];} $url = $data_path.'/'.$bf_file1[0]; //첨부파일 출력echo $url?>
답변에 대한 댓글 1개
9년 전
$file = get_file($bo_table, $wr_id)
이건 참고입니다
Copy
$file[0]['href'] : 파일 다운로드 링크$file[0]['path'] = 파일이 저장되어 있는 경로$file[0]['size'] = 파일 사이즈$file[0]['datetime'] = 파일이 저장된 일시$file[0]['content'] = 파일 대체텍스트 $file[0]['view'] = 파일 원본 보기 링크 $file[0]['file'] = 실제 서버에 저장되어 있는 파일 명$file[0]['image_width'] = 파일 가로 사이즈 $file[0]['image_height'] = 파일 세로 사이즈
[/code]
답변을 작성하려면 로그인이 필요합니다.
한가지더 !
sql_query, sql_fetch_array 이부분 호출하려면 어떤걸 인클루드해야할까요?