private function replyMostPhoto($data,$arr)
{
$this->logger("已经到达回复多图文!".$arr[0]['Title']);
$itemModel="
<item>
<Title><![CDATA[%s]]></Title>
<Description><![CDATA[%s]]></Description>
<PicUrl><![CDATA[%s]]></PicUrl>
<Url><![CDATA[%s]]></Url>
</item>";

$Model_item="";//用来接收模板
foreach($arr as $item)
{
$Model_item.=sprintf($itemModel,$item['Title'],$item['Description'],$item['PicUrl'],$item['Url']);
}
$this->logger("here".$arr['Title']);
$xml=<<<php
<xml>
<ToUserName><![CDATA[%s]]></ToUserName>
<FromUserName><![CDATA[%s]]></FromUserName>
<CreateTime>%s</CreateTime>
<MsgType><![CDATA[news]]></MsgType>
<ArticleCount>%s</ArticleCount>
<Articles>
$Model_item
</Articles>
</xml>
php;
$this->logger($xml);
echo sprintf($xml,$data['FromUserName'],$data['ToUserName'],$data['time()'],count($arr));

}

最新文章

  1. Python黑帽编程1.3 Python运行时与包管理工具
  2. Windows中explorer(图形壳)
  3. 开始学习c语言
  4. PDF的信息表达原理及特点分析
  5. BigInteger在Java8中的改进
  6. (35)odoo中widget
  7. GDB代码调试与使用
  8. 项目笔记---Socket Error Code翻译
  9. window的画图工具(mspaint)也可以帮助我们开发和调试代码的.
  10. 文件下载,带转码-&amp;gt;pdf-&amp;gt;swf
  11. PHP之CI框架架设错误--Only variable references should be returned by reference
  12. 开始QT+OpenCV学问
  13. this is it
  14. 使用virsh搭建虚拟机管理环境
  15. Quill编辑器介绍及扩展
  16. 手机端rem如何适配_rem详解及使用方法
  17. Unity 使用TexturePackerGUI打包图集 Sprite 图片边上有线
  18. (后端)项目中的错误之java中判断字符里面含有某些字符
  19. 中国移动物联网ONENET平台数据本地采集工具
  20. Spring 拦截器实现+后台原理(MethodInterceptor)

热门文章

  1. cf C. Inna and Dima
  2. 设计模式(六):Singleton 单件模式 -- 创建型模式
  3. 【转】Java 中字符串的格式化
  4. Linux 下 的 cc 和 gcc
  5. Introduction to Web Services
  6. 《Linear Algebra and Its Applications》-chaper2-矩阵的逆
  7. C++ Template Specialization (模板特化)
  8. mysql oracle静默 一键安装脚本
  9. windows server 2003 64x 读取office数据终极解决办法 The &#39;Microsoft.Jet.OLEDB.4.0&#39; provider is not registered
  10. UVa 10025: The ? 1 ? 2 ? ... ? n = k problem