show code js

2013年9月17日 星期二

install pear to php on windows system


  1. Install pear in php on windows
  2. Download http://pear.php.net/go-pear.phar
  3. goto php directory
  4. open cmd and run php go-pear.phar to start installing pear module
  5. when it is done you can find PEAR_ENV.reg and double click it.
  6. it will change php.ini when it is done to restart your web server.
  7. Test pear, create and run php file, it will show bool(true)
  • <?php
  • require_once 'System.php';
  • var_dump(class_exists('System', false));
  • ?>
  1. If you want to install module of pear, you can open cmd and goto php directory, run pear install module_name.
  2. ex: pear install MDB2
  3. Test MDB2 module, create and run php file, it will show bool(true)
  • <?php
  • ini_set('include_path','c:\php\pear');
  • require_once 'MDB2.php';
  • var_dump(class_exists('MDB2', false));
  • ?>


沒有留言:

張貼留言