cvs: peardoc /en/package/php/php-compat usage.xml

From: Date: Tue, 23 Nov 2004 15:54:32 +0000
Subject: cvs: peardoc /en/package/php/php-compat usage.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-5215@lists.php.net to get a copy of this message
aidan Tue Nov 23 10:54:32 2004 EDT Added files: /peardoc/en/package/php/php-compat usage.xml Log: Initial commit http://cvs.php.net/co.php/peardoc/en/package/php/php-compat/usage.xml?r=1.1&p=1 Index: peardoc/en/package/php/php-compat/usage.xml +++ peardoc/en/package/php/php-compat/usage.xml <?xml version="1.0" encoding="ISO-8859-1" ?> <!-- $Revision: 1.1 $ --> <refentry id="package.php.php-compat.usage"> <refnamediv> <refname>Advanced usage</refname> <refpurpose>Describe techniques for advanced usage</refpurpose> </refnamediv> <refsect1> <title>Advanced usage</title> <para> In order to create portable code, it's best to assume all the native functions already exist. Littering a script with calls to PHP_Compat can become messy, and increase the work required to port the code. </para> <para> To solve this there are a number of approaches. The first would be adding the load statements to a file which is included at the top of every document. The second, and prefered method is to make use of <literal>php_auto_append</literal> <filename>php.ini</filename> value. This can be set in a <filename>.htaccess</filename> file, and no modifications to the actual code are required. </para> <para> If <filename>phpcompat.php</filename> was the name of the file, an example entry in a <filename>.htaccess</filename> could be <literal>php_value php_auto_append phpcompat.php</literal>. The <filename>phpcompat.php</filename> file would make use of either the loadVersion or loadFunction/loadConstant methods discussed in the next page. </para> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->

« previous php.pear.doc (#5215) next »