我对PHP相对较新,更多的是使用XML。simplexml_load_file()错误
我有一个脚本在我的本地工作完美,但是当我试图把它在我的服务器上,我得到这个消息:
警告:使用simplexml_load_file() [function.simplexml加载文件]: http://api.wefeelfine.org:8080/ShowFeelings?display=xml&feeling=happy&returnfields=imageid,feeling,sentence,posttime,postdate,posturl,gender,country,state,city,lat,lon&limit=0&extraimages=20:1:
分析器错误:文档是空的在 /home2/alsweet/public_html/notalone.php 第21行
不工作的代码行是这样的:
// get api feed
$xml = simplexml_load_file('http://api.wefeelfine.org:8080/ShowFeelings?display=xml&feeling=' . $feeling . '&returnfields=imageid,feeling,sentence,posttime,postdate,posturl,gender,country,state,city,lat,lon&limit=0&extraimages=20');
我犯了一个错误吗? 我应该向我的托管服务提供商说话吗?
我不认为这是在他使用其只是错误输出的实际URL。看到他的源代码没有“:1” – KTastrophy 2010-11-28 20:45:48
@KThompson你说得对,我没有翻看过。当使用他的网址时,我得到一个空集。 – wajiw 2010-11-28 20:48:36