파일업로드 후 파일다운로드시 잘못된 접근입니다. 에러메세지

Facebook Twitter GooglePlus KakaoStory KakaoTalk NaverBand
자료실 | 그누보드5

파일업로드 후 파일다운로드시 잘못된 접근입니다. 에러메세지

$ss_name = "ss_view_{$bo_table}_{$list[ $i]['wr_id']}";
if (!get_session($ss_name)); set_session($ss_name, TRUE);



위의 소스를 넣어주시면 해결되는듯 합니다.




     
    <?php // 파일다운로드


set_session('ss_view_'.$bo_table.'_'.$list[$i][wr_id], TRUE);
$sql = " select * from $g5[board_file_table] where bo_table = '". $bo_table. "' and wr_id = '". $list[$i][wr_id] ."' order by bf_no ";
 $result = sql_query($sql);
 while ($row = sql_fetch_array($result))
 {
 $down_link = "download.php?bo_table={$bo_table}&wr_id={$list[$i][wr_id]}&no={$row[bf_no]}";
 $file_source = addslashes($row[bf_source]);
 $file_type = preg_replace('/^.*\.([^.]+)$/D', '$1', $file_source);
 //$file_size = get_filesize($row[bf_filesize]);
 if(!in_array($file_type, array('jpg', 'jpeg', 'gif', 'bmp', 'png'))){ //이미지는 제외
echo "<a href=\"".$down_link."\" title=\"".$file_source."\">";
 //echo "<a href=\"".$down_link."\" title=\"".$file_source."\">";
 //echo "<img src='". $board_skin_url ."/filetype/". $file_type .".gif' border=0 align='absmiddle' alt=\"".$file_source."\">({$file_size})";
 //echo "<a href=\"".$down_link."\" title=\"".$file_source."\">";
 echo "<img src='". $board_skin_url ."/filetype/". $file_type .".gif' border=0 align='absmiddle' alt=\"\">";
 echo "</a>&nbsp;";
 }
 }
     ?>
 
      

      <?php } else { ?> <?php } ?>



0 Comments