我有一些返回PHP警告的PHP代码:
[30-Aug-2018 11:10:19 America/New_York] PHP Warning: simplexml_load_file(): I/O warning : failed to load external entity "http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=[HIDDEN]&AssociateTag=[HIDDEN]&Operation=ItemLookup&IdType=ASIN&ItemId=B003U4L36I&ResponseGroup=Images%2CMedium%2CLarge%2CSmall%2CItemAttributes%2CItemIds%2CSalesRank%2CReviews%2CBrowseNodes&Timestamp=2018-08-30T15:10:19.000Z&Signature=[HIDDEN]; in /functions.php on line 192
我将其格式化为更具可读性:
[30-Aug-2018 11:10:19 America/New_York] PHP Warning: simplexml_load_file(): I/O warning : failed to load external entity
"
http://webservices.amazon.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[HIDDEN]&
AssociateTag=[HIDDEN]&
Operation=ItemLookup&
IdType=ASIN&
ItemId=B003U4L36I&
ResponseGroup=Images%2CMedium%2CLarge%2CSmall%2CItemAttributes%2CItemIds%2CSalesRank%2CReviews%2CBrowseNodes&
Timestamp=2018-08-30T15:10:19.000Z&
Signature=[HIDDEN];
in /functions.php on line 192
functions.php中的192行是:
$xml_doc = simplexml_load_file($request);
if($debugOutput == TRUE) echo time().' :: getXMLByASIN_V2 :: XML_DOC returned and loaded.</pre><BR>';
return $xml_doc;
谢谢。