I am using PHP for the first time. I am using the php sample for uploading image on ebay sandbox. I am getting the following error on running the PHP file:
PHP Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in /home/nish/stuff/market place/test/php5/UploadImage/UploadSiteHostedPictures.php on line 69
PHP Warning: simplexml_load_string(): HTTP/1.1 200 OK in /home/nish/stuff/market place/test/php5/UploadImage/UploadSiteHostedPictures.php on line 69
PHP Warning: simplexml_load_string(): ^ in /home/nish/stuff/market place/test/php5/UploadImage/UploadSiteHostedPictures.php on line 69
PHP Notice: Trying to get property of non-object in /home/nish/stuff/market place/test/php5/UploadImage/UploadSiteHostedPictures.php on line 92
PHP Notice: Trying to get property of non-object in /home/nish/stuff/market place/test/php5/UploadImage/UploadSiteHostedPictures.php on line 93
PHP Notice: Trying to get property of non-object in /home/nish/stuff/market place/test/php5/UploadImage/UploadSiteHostedPictures.php on line 93
PHP Notice: Trying to get property of non-object in /home/nish/stuff/market place/test/php5/UploadImage/UploadSiteHostedPictures.php on line 94
PHP Notice: Trying to get property of non-object in /home/nish/stuff/market place/test/php5/UploadImage/UploadSiteHostedPictures.php on line 94
Relevant lines are:
69. $respXmlObj = simplexml_load_string($respXmlStr); // create SimpleXML object from string for easier parsing
// need SimpleXML library loaded for this
92. $ack = $respXmlObj->Ack;
93. $picNameOut = $respXmlObj->SiteHostedPictureDetails->PictureName;
94. $picURL = $respXmlObj->SiteHostedPictureDetails->FullURL;
What I can understand is the respXMLObj is not getting set properly. I have checked that simleXML support is enabled.
Could someone please help me debug this. Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…