程序在本地测试没有问题,放到服务器上就报错了
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数据中的每一个标签 { //这里是处理远程接口文件的代码 }
解决方案 »
- ruby到底是什么。。。
- 想把原来C/S系统转为PHP的B/S结构,问能Web页面与PHP代码分离编程吗?
- 关于创建数据库函数MYSQL_create_db()出现未定义数据函数的错误?
- session问题
- 【求助大虾】问一下php的mysql_pconnect()函数
- 急Mysql子查询限制条件的一个问题
- 使用smarty怎么函数文件中不能使用smarty变量?
- dojo 搭建基于xmpp的即时聊天系统
- Warning: fopen(counter.dat): failed to open stream: Permission denied in
- 怎样编写一个PHP?
- access数据库分页怎么实现?
- phpmyadmin浏览不到表单post进去的数据
ome/www/wwwroot/photo.chinacars.com/manage/photogetpic.php 路径问题
这个!