当我需要对一个文件应用修改时,我使用下面的代码:
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Modification name</name>
<file path="system/library/cart/cart.php">
<operation>
<search><![CDATA[<some code to apply>]]></search>
<add position="after"><![CDATA[// <some code to apply>]]></add>
</operation>
</file>
<modification>
目标文件通过标签path
的属性设置。file
如何对所有 .php 文件应用修改?我试过没有运气下面的代码:
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Modification name</name>
<file path="**/*.php">
<operation>
<search><![CDATA[<some code to apply>]]></search>
<add position="after"><![CDATA[// <some code to apply>]]></add>
</operation>
</file>
<modification>