Default without customization

Overview

Generate default phpinfo() style PEAR information (PEAR install with package list from pear.php.net channel) with default green skin.

Screenshot

...

default green skin with package full detailed

...

Dependencies

This example requires mandatory resources :

Explains step by step

Include the mandatory library at line 23, then instanciated a new PEAR_Info object at line 29 without parameters. That means that you'll search for pear configuration file (pear.ini on Windows, .pearrc on other platform) into default system directory (PEAR_CONFIG_SYSCONFDIR => c:\windows or user home => getenv('HOME')). And finally display result at line 32.

Source Code

PHP code
  1. <?php
  2. /**
  3.  * Generate default phpinfo() style PEAR information.
  4.  *
  5.  * PHP versions 4 and 5
  6.  *
  7.  * @category PEAR
  8.  * @package  PEAR_Info
  9.  * @author   Laurent Laville <pear@laurent-laville.org>
  10.  * @license  http://www.php.net/license/3_01.txt  PHP License 3.01
  11.  * @version  CVS: $Id: pear_info.php,v 1.3 2007/12/15 16:27:23 farell Exp $
  12.  * @link     http://pear.php.net/package/PEAR_Info
  13.  * @ignore
  14.  */
  15.  
  16. /* May be required on slower (dial-up) connections
  17. ini_set('default_socket_timeout', 600);
  18. ini_set('max_execution_time', 600);
  19. ini_set('max_input_time', 600);
  20. */
  21.  
  22. // require the PEAR_Info file
  23. require_once 'PEAR/Info.php';
  24.  
  25. // If you need to set a http_proxy uncomment the line below
  26. // PEAR_Info::setProxy('your.proxy.here');
  27.  
  28. // Create PEAR_Info object
  29. $info = new PEAR_Info();
  30.  
  31. // Display PEAR_Info output
  32. $info->display();
  33. ?>
generated by Generic Syntax Highlighter - GeSHi