1. 서버 ERROR 메세지
Web server error!:getMiAddr
net.sf.json.JSONException : A JSONArray text must start with '[' at character 1 of
Fatal error sqlsrv_query Unknown exception caught in process_params in
C:\APM_setup\htdocs\middle_addr.phpon line13
< middle_addr.php 화일>
require "./mssql_connect.php";
$connectionInfo = array("UID" => $uid, "PWD" => $pwd, "Database"=>$dbname, "CharacterSet" => "UTF-8" );
$conn = sqlsrv_connect( $serverName, $connectionInfo);
$result_array = array();
if( $conn )
{
$result = sqlsrv_query($conn ,"select RTRIM(addr) as addr,port,tcp from MiddleInfo",NULL);
while($row = sqlsrv_fetch_array($result,SQLSRV_FETCH_ASSOC))
{
$result_array[]=$row;
}
}
else
{
die( print_r( sqlsrv_errors(), true));
}
/* Close the connection. */
sqlsrv_close( $conn);
$result_array = json_encode($result_array);
echo $result_array;
?>
급합니다. 에러해결 방법 문의드립니다
|