install pear to php on windows system
- Install pear in php on windows
- Download http://pear.php.net/go-pear.phar
- goto php directory
- open cmd and run php go-pear.phar to start installing pear module
- when it is done you can find PEAR_ENV.reg and double click it.
- it will change php.ini when it is done to restart your web server.
- Test pear, create and run php file, it will show bool(true)
- <?php
- require_once 'System.php';
- var_dump(class_exists('System', false));
- ?>
- If you want to install module of pear, you can open cmd and goto php directory, run pear install module_name.
- ex: pear install MDB2
- 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));
- ?>
沒有留言:
張貼留言