SimpleXMLElement Object
(
[@attributes] => Array
(
[page] => 1
[pagesize] => 2
[RecordCount] => 13995
) [news] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[classid] => J162HHC8824H
[classname] => 地市信息
) [id] => 37169
[title] => 漯河市旅游局部署全市旅游安全工作
[pic] => SimpleXMLElement Object
(
) [url] => /Gov/CityNews/2014-01/14135379937.shtml
[addtime] => 2014/1/14 10:19:38
) [1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[classid] => J162HHC8824H
[classname] => 地市信息
) [id] => 37168
[title] => 三门峡市旅游局深入学习贯彻三门峡市委六届五次全会精神
[pic] => SimpleXMLElement Object
(
) [url] => /Gov/CityNews/2014-01/14792100301.shtml
[addtime] => 2014/1/14 10:17:14
) ))
得到的是对象,不符合 smarty 的要求
至少应 $qf->assign('xml',$xml->newes);
(
[@attributes] => Array
(
[page] => 1
[pagesize] => 2
[RecordCount] => 13995
) [news] => Array
(
[0] => SimpleXMLElement Object
(
[@attributes] => Array
(
[classid] => J162HHC8824H
[classname] => 地市信息
) [id] => 37169
[title] => 漯河市旅游局部署全市旅游安全工作
[pic] => SimpleXMLElement Object
(
) [url] => /Gov/CityNews/2014-01/14135379937.shtml
[addtime] => 2014/1/14 10:19:38
) [1] => SimpleXMLElement Object
(
[@attributes] => Array
(
[classid] => J162HHC8824H
[classname] => 地市信息
) [id] => 37168
[title] => 三门峡市旅游局深入学习贯彻三门峡市委六届五次全会精神
[pic] => SimpleXMLElement Object
(
) [url] => /Gov/CityNews/2014-01/14792100301.shtml
[addtime] => 2014/1/14 10:17:14
) ))
得到的是对象,不符合 smarty 的要求
至少应 $qf->assign('xml',$xml->newes);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货