文件名:fcktemplates.xml内容如下:
<?xml version="1.0" encoding="utf-8" ?>
<Templates imagesBasePath="/userfiles/template_img/_B_">
<!--
 * 祝福的信纸(b_zhufu123) 
-->
<Template title="Strange Template" image="template2.jpg">
<Description>A template that defines two colums, each one with a title, and some text.</Description>
<Html>
<![CDATA[
<table width="99%" cellspacing="0" cellpadding="0" border="0" background="/userfiles/template_img/b_zhufu123/_B_xln_shang01.gif" _moz_resizing="true"> 
<tbody> 
<tr> 
<td height="100"></td>
</tr> 
</tbody>
</table> 
]]>
</Html>
</Template><!--
 * 你是我的幸福(b_lov4s123) 
-->
<Template title="Strange Template" image="template12.jpg">
<Description>A template that defines two colums, each one with a title, and some text.</Description>
<Html>
<![CDATA[
<table width="99%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="200" height="132" background="/userfiles/template_img/b_lov4s123/_B_niwo_shang01.gif"/>
</tr>
</tbody>
</table>
]]>
</Html>
</Template>

</Templates>用php对此文件进行如下操作
第一步我怎么样得到<Templates imagesBasePath="/userfiles/template_img/_B_">
imagesBasePath 中的值第二步当目录改变时,如在userfiles的外面再加了一个WEB目录,
这些我就要将原来xml文件中的 所有/userfiles/替换成/WEB/userfiles/
再保存fcktemplates.xml