엑셀다운 실행시 500에러가 떠요 쿼리문에 문제가 있는지 도와주세요
본문
<?php
include_once('./_common.php');
/*================================================================================
php_writeexcel http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/
=================================================================================*/
include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_workbook.inc.php');
include_once(G5_LIB_PATH.'/Excel/php_writeexcel/class.writeexcel_worksheet.inc.php');
$sql_order = " order by wr_num, wr_reply ";
if ($sca || $stx)
{
$sql = " select distinct wr_parent from $write_table where $sql_search $sql_order ";
}
else
{
$sql = " select * from $write_table where wr_is_comment = 0 $sql_order ";
}
$result = sql_query($sql);
//$result = iconv("utf-8", "euc-kr" , $result);
$cnt = @mysql_num_rows($result);
if (!$cnt)
alert("출력할 내역이 없습니다.");
header('Content-Type: application/vnd.ms-excel');
header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
header('Content-Disposition: attachment; filename="WAofficelist_' . date("ymd_his", time()) . '.xls"');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('content-transfer-encoding: binary');
답변을 작성하시기 전에 로그인 해주세요.