易截截图软件、单文件、免安装、纯绿色、仅160KB

请问php怎么在已有的xml文件上编写?

这是xml文件
XML code:
<?xml version="1.0" encoding="iso-8859-1"?>
<gallery>
<images>
<title><![CDATA[ ]]></title>
<description><![CDATA[ ]]></description>
<tmb>FphotoGallery/tmb1.jpg</tmb>
<img>FphotoGallery/img1.jpg</img>
</images>
<gallery>


怎么用php在后面添加内容?
我这么写的
PHP code:
$dom = new DOMDocument('1.0');
$gallery = $dom->gappendChild($dom->createElement('gallery'));
$images = $gallery->gappendChild($dom->createElement('images'));
$title = $images->gappendChild($dom->createElement('title'));
$title->gappendChild($dom->createTextNode('<![CDATA[ ]]>'));
$description = $images->gappendChild($dom->createElement('description'));
$description->gappendChild($dom->createTextNode('<![CDATA[ ]]>'));
$tmb = $images->gappendChild($dom->createElement('tmb'));
$tmb->gappendChild($dom->createTextNode('FphotoGallery/a.jpg'));
$img = $images->gappendChild($dom->createElement('img'));
$img->gappendChild($dom->createTextNode('FphotoGallery/a.jpg'));
$dom->formatOutput = true;
$dom -


相关问答:

北京急招linux、PHP网络应用开发

我们隶属中科院计算所网络重点实验室(http://www.ict.ac.cn/survey/channel/detail443.asp)基础设施课题组.
现因项目和业务拓展的需要,特需要招聘与项目相关的网络应用工程师1-2名。

具体要求如下。有意者 ......

php webservice报错Object id #2啦!

webclient.php文件:
<?php
$arrOptions = array( 'uri'=>'http://10.10.19.111/','location'=>'http://10.10.19.111/webservice/webservice.php','trace' ......

php 正则取双引号内容

例如:  $s='s:56:" <a href="cp.php?ac=task&taskid=7">领取每日积分大礼包 </a>"dfdfdfds';
      变成
      $s='& ......

PHP 连接Oracle 出错

<?php
  getenv("ORACLE_HOME");
  $conn=ocilogon("test","test","test_db");
  if($conn)  
  echo success;  
&nb ......

付费求一段php代码,支持淘宝交易 - PHP / 基础编程

各位大侠 
求一段php代码 
可以实现以下功能 
针对不同的浏览器显示不同的图片 
就是有一张图片,只想给ie6用户看到 
如果ie7、chrome、firefox用户浏览则显示另外一张图片  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号