程序在本地测试没有问题,放到服务器上就报错了
Warning: simplexml_load_file(http://img.chinacars.com/gallery ... ildPhotoIds&parentId=15992&captionType=1&orderType=2&sortType=1&offsetStart=0&offsetValue=1000&derivativeType=3) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/www/wwwroot/photo.chinacars.com/manage/photogetpic.php on line 28Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://img.chinacars.com/gallery2/api/api.php?method=fetchChildPhotoIds&parentId=15992&captionType=1&orderType=2&sortType=1&offsetStart=0&offsetValue=1000&derivativeType=3" in /home/www/wwwroot/photo.chinacars.com/manage/photogetpic.php on line 28Warning: Invalid argument supplied for foreach() in /home/www/wwwroot/photo.chinacars.com/manage/photogetpic.php on line 29
页面编码用的是utf-8,服务器是可以访问远程接口(http://img.chinacars.com/gallery ... ildPhotoIds&parentId=15992&captionType=1&orderType=2&sortType=1&offsetStart=0&offsetValue=1000&derivativeType=3)大家看看我的代码是否有问题view sourceprint?1 $strUrl=GetInterUrl($photoid); $xml = simplexml_load_file($strUrl); //读取XML文件 foreach($xml->item as $a) //循环读取XML数据中的每一个标签 { //这里是处理远程接口文件的代码 }
Warning: simplexml_load_file(http://img.chinacars.com/gallery ... ildPhotoIds&parentId=15992&captionType=1&orderType=2&sortType=1&offsetStart=0&offsetValue=1000&derivativeType=3) [function.simplexml-load-file]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/www/wwwroot/photo.chinacars.com/manage/photogetpic.php on line 28Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://img.chinacars.com/gallery2/api/api.php?method=fetchChildPhotoIds&parentId=15992&captionType=1&orderType=2&sortType=1&offsetStart=0&offsetValue=1000&derivativeType=3" in /home/www/wwwroot/photo.chinacars.com/manage/photogetpic.php on line 28Warning: Invalid argument supplied for foreach() in /home/www/wwwroot/photo.chinacars.com/manage/photogetpic.php on line 29
页面编码用的是utf-8,服务器是可以访问远程接口(http://img.chinacars.com/gallery ... ildPhotoIds&parentId=15992&captionType=1&orderType=2&sortType=1&offsetStart=0&offsetValue=1000&derivativeType=3)大家看看我的代码是否有问题view sourceprint?1 $strUrl=GetInterUrl($photoid); $xml = simplexml_load_file($strUrl); //读取XML文件 foreach($xml->item as $a) //循环读取XML数据中的每一个标签 { //这里是处理远程接口文件的代码 }
解决方案 »
- 老是提示连接数据库失败,哪里出错啊
- PHP调用客户端程序
- 求一个浮点数的转换方法
- smarty模板中的foreach能实现以下内容吗??
- 大家有谁做过printer_open(),printer_wirte()不能打印,求救!~~
- 哪位高手能帮我的分页加个跳转到。。。页的<input> 代码如下 :再线等待,若分数不够继续加,如果有好的请你给我推荐也行
- 实现按条件查询my sql 表内容并输出显示
- PHP5.0+Apache2.0配置好后,程序运行结果的字体超大!怎么解决????
- 如何用php写一条语句,测试服务器是否支持php? 就像asp用<% response.write "support asp" %>一样!
- PHP论坛用户上传头像的问题
- access数据库分页怎么实现?
- phpmyadmin浏览不到表单post进去的数据
ome/www/wwwroot/photo.chinacars.com/manage/photogetpic.php 路径问题
这个!