From f354e7b59b0d20ccb1d1a5b16beebc5715808ba7 Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Mon, 12 Nov 2007 16:52:21 +0000 Subject: Added ref search, it_auto_prepend.php docs --- README | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/README b/README index 19bc750..c4d4c24 100644 --- a/README +++ b/README @@ -1,23 +1,42 @@ ITools - A simple support library for PHP ========================================= Home: http://itools.search.ch/ -Subversion Repository: http://itools.search.ch/itools/live License: http://itools.search.ch/itools/live/COPYING +Installing: svn co http://itools.search.ch/itools/live itools +Reference: http://itools.search.ch/(function | class | class/function) ITools is a collection of PHP functions and classes which make a few common -tasks in PHP easier. It works in PHP 4 and up. Typical tasks should become -easy enough to remove the need for a framework. +tasks in PHP easier. It works in PHP 4 and up. + +Our examples omit array() around function parameters and use dangling commas. +To get that, you can either use our just-in-time syntax converter or use +our patch for PHP (see http://cschneid.com/php/ for info). To use the syntax +converter, see the chapter about it_auto_prepend.php below. + +it_auto_prepend.php - ITools environment (optional) +--------------------------------------------------- +If you include this with the PHP auto_prepend_file ini setting you get the +following benefits: +a) Includes all the ITools functionality +b) auto_prepend.php is included for each directory in the include path. +c) Automatic syntax conversion is enabled if you have a vanilla PHP without +our syntax patch installed. +NOTE: This may need manual configuration on shared hosting +d) If you run PHP 5 an autoloader for classes is installed, you don't need +to require any files (it looks for foo.class if you access class foo). +e) $GLOBALS['IT_HOME'] is set to one level above the DOCUMENT_ROOT in web +mode, one level above the script for CLI mode: This allows access to data +directories from web and CLI mode alike. -Note: Our examples omit array() around function parameters and use dangling -commas. If you want to do that, you either need our PHP patch (see -http://cschneid.com/php/ for infos and the patch) or our just-in-time syntax -converter (not yet available). +Example: + # Put this line in .htaccess or httpd.conf to set up ITools environment + php_value auto_prepend_file YOUR_PATH_TO_ITOOLS/it_auto_prepend.php it_html - HTML output generation -------------------------------- it_html creates a global function for each common html tag. Those functions -accept variable arguments, key=>value pairs as considered attributes. +accept variable arguments, key=>value pairs are considered attributes. Example: new it_html; -- cgit v1.2.3