6.0.0-git
2024-05-06

Diff for Doc/PEAR between 2 and 3

+ PEAR-style Packages



[[toc]]



++ Using files in the data dir



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



<code>

<file name="named_colors.txt" role="data"/>

<file name="filethatusesit.php" role="php>

 <replace from="@data-dir@" to="data_dir" type="pear-config"/>

</file>

</code>



and</code>

and in filethatusesit.php:


{{filethatusesit.php}}:

<code type="php">

<?php

// ...

$namedcolorslocation = '@data-dir@/named_colors.txt';

$fp = fopen($namedcolorslocation);

</code>

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