파일 첨부 경로 관련 오류 수정 (blog.lib.php) 정보
파일 첨부 경로 관련 오류 수정 (blog.lib.php)첨부파일
본문
blog.lib.php 파일의 오류 수정입니다.
블로그 자체에서 첨부 파일 목록 나올때 클릭 하면 링크가 잘못 된 문제가 있어서 수정하였습니다.
/////////////////////////////////////
function get_blog_file($post_id)
{
global $g4, $gb4, $qstr, $current;
$file = array();
$file['count'] = 0;
$sql = " select * from {$gb4['file_table']} where blog_id = '{$current['id']}' and post_id = '{$post_id}' order by file_num ";
$result = sql_query($sql);
while ($row = sql_fetch_array($result))
{
$no = $file['count'];
$file[$no]['href'] = "{$gb4['path']}/{$gb4['blog']}/download.php?mb_id={$current['mb_id']}&id={$row[id]}";
$file[$no]['download'] = $row['download_count'];
$file[$no]['path'] = "{$gb4['path']}/data/blog/file/{$current['mb_id']}";
$file[$no]['size'] = $row['file_size']; //get_filesize($row['file_size']);
$file[$no]['datetime'] = $row['datetime'];
$file[$no]['save_name'] = $row['save_name'];
$file[$no]['real_name'] = $row['real_name'];
$file['count']++;
}
return $file;
}
}
댓글 전체
감사합니다~ ^^
감사합니다.