6.0.0-beta13
4/11/26
  • Message
    This page is locked by 103.149.241.54 for 6 Minutes.

PEAR-style Packages

Using files in the data dir

Finding the data stuff isn't difficult, use a replacement:


<file name="named_colors.txt" role="data"/>
<file name="filethatusesit.php" role="php>
 <replace from="@data-dir@" to="data_dir" type="pear-config"/>
</file>

and in filethatusesit.php:

&lt;?php
// ...
$namedcolorslocation = '@data-dir@/named_colors.txt';
$fp = fopen($namedcolorslocation);

Note that this does not work if using Horde's create_symlinks.php to install PEAR packages.