|
|
|
สอบถาม Error ของ curl_init() , XML ครับ Server Window |
|
|
|
|
|
|
|
Code (PHP)
<?php
$xml_rates='';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://203.xxx.xxx.xxx/inputter/xml/p.php");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "xml_rate=".urlencode($xml_rates));
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
curl_close($ch);
$arr = simplexml_load_string($result);
print_r($arr);
//echo htmlspecialchars($result);
?>
Sv A ส่งไปหา Sv B
Code (PHP)
<?php echo "1111A";?>
Code Sv B
Message Error หลังจาก Run Code ที่ Sv A ครับ ต้องแก้ไขอย่างไรหรอครับ Sv A = Linux , Sv B = Window Server
SimpleXMLElement Object ( [head] => SimpleXMLElement Object ( [meta] => SimpleXMLElement Object ( [@attributes] => Array ( [http-equiv] => Content-Type [content] => text/html; charset=iso-8859-1 ) ) [title] => 500 - Internal server error. [style] => SimpleXMLElement Object ( [@attributes] => Array ( [type] => text/css ) [comment] => SimpleXMLElement Object ( ) ) ) [body] => SimpleXMLElement Object ( [div] => Array ( [0] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => header ) [h1] => Server Error ) [1] => SimpleXMLElement Object ( [@attributes] => Array ( [id] => content ) [div] => SimpleXMLElement Object ( [@attributes] => Array ( [class] => content-container ) [fieldset] => SimpleXMLElement Object ( [h2] => 500 - Internal server error. [h3] => There is a problem with the resource you are looking for, and it cannot be displayed. ) ) ) ) ) )
Tag : PHP
|
|
|
|
|
|
Date :
2015-01-28 16:14:55 |
By :
nut_ch31 |
View :
609 |
Reply :
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
อยากถามว่าต้องแก้ไขอย่างไรหรอครับ ทำทให้ มันได้ Message 1111A ตาม Code Sv B อย่างไรหรอคัรบ
|
|
|
|
|
Date :
2015-01-28 16:15:45 |
By :
nut_ch31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 02
|