Question

Is there a way to get a file content and assign to property for Phing?

An equivalent to ant:

<project name="foobar" default="foo">
   <target name="foo">
     <loadfile property="foo.bar" srcFile="foobar/moo.txt"/>
     <echo>${foo.bar}</echo>
   </target>
</project>

?

Was it helpful?

Solution

Doesn't the loadfile task do what you're after?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top