[英]Extract php filename with phing
我在Phing 3中使用Aptana,效果很好。 我创建了一个build.xml脚本,用于更改php文件中的某些数据
我在原始文件中有这样的标题
/**
/ @package x--exttype--x x--complete_name--x for Joomla! x--Jversion--x
/ @version x--version--x: x--filename--x
/ @author x--author--x
/ @link x--website--x
/ @copyright (C) x--year--x
/ @license x--license--x
**/
并且我要替换所有占位符x--placeholder--x一切正常,除了x--filename--x,我将使用包含该占位符的php文件的名称并将其替换。 我在网上搜索,但一无所获。
Phing有功能在忙吗?
谢谢
是的,phing可以修改文件: ReflexiveTask
。
手册中的示例:
<reflexive>
<fileset dir=".">
<include pattern="*.html">
</fileset>
<filterchain>
<replaceregexp>
<regexp pattern="\r\n" replace="\n"/>
</replaceregexp>
</filterchain>
</reflexive>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.