테스트 사이트 - 개발 중인 베타 버전입니다

엑셀다운 실행시 500에러가 떠요 쿼리문에 문제가 있는지 도와주세요

wonsysop 4년 전 조회 3,425

</p>

<p><?php

include_once('./_common.php');

   /*================================================================================

    php_writeexcel <a href="http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/" target="_blank" rel="noopener noreferrer">http://www.bettina-attack.de/jonny/view.php/projects/php_writeexcel/</a>

    =================================================================================*/

    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');</p>

<p>$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 "; 

  } </p>

<p>    $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'); </p>

<p> </p>

<p>

댓글을 작성하려면 로그인이 필요합니다.

답변 2개

https://sir.kr/qa/?wr_id=405998

일단 구체적인 에러 메시지를 확인하세요.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

$sql_search 이게 어딧나요? 

아님 echo $sql로 보세요 몇가지 주석처리하시고 

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인