[PHP]小改配置使用APM Express(QeePHP)中的PEAR
来源:学生作业帮助网 编辑:作业帮 时间:2024/05/13 08:20:49 PHP
[PHP]小改配置使用APM Express(QeePHP)中的PEARPHP
【BK网络学院 - PHP】
一直在用QeePHP的APM Express作为PHP开发环境,今天才发现,廖大已经给附带了安装好的PEAR,不得不膜拜廖大的无微不至。不过直接使用PEAR.bat会提示 找不到 'PEAR.php'的错误
运行PEAR的错误提示K:\apmxe\php5>pear
Warning: require_once(PEAR.php): failed to open stream: No such file or Director
y in Config.php on line 27
Warning: require_once(PEAR.php): failed to open stream: No such file or director
y in K:\apmxe\php5\PEAR\PEAR\Config.php on line 27
Fatal error: require_once(): Failed opening required 'PEAR.php' (include_path='D
:\apmxe\php5\pear') in K:\apmxe\php5\PEAR\PEAR\Config.php on line 27
看到是因为路径不同引起的,需要修改命令配置文件 K:\apmxe\php5\PEAR\pearcmd.php
在第32行,判断是否为PHP环境设置了PEAR的路径
if ('K:\apmxe\php5\pear' != '@'.'include_path'.'@') {
ini_set('include_path', 'K:\apmxe\php5\pear');
$raw = false;
} else {
将其中的路径修改为当前APMEX的安装路径即可。
命令行运行:pear list
代码K:\apmxe\php5>pear list
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
=========================================
PACKAGE VERSION STATE
Archive_Tar 1.3.2 stable
Console_Getopt 1.2.3 stable
PEAR 1.7.2 stable
Structures_Graph 1.0.2 stable
愉快的看到,已经安装好的PEAR程序列表
最后,更新,即可开始PEAR之旅
pear channel-update pear.php
PHP
一直在用QeePHP的APM Express作为PHP开发环境,今天才发现,廖大已经给附带了安装好的PEAR,不得不膜拜廖大的无微不至。不过直接使用PEAR.bat会提示 找不到 'PEAR.php'的错误
运行PEAR的错误提示K:\apmxe\php5>pear
Warning: require_once(PEAR.php): failed to open stream: No such file or Director
y in Config.php on line 27
Warning: require_once(PEAR.php): failed to open stream: No such file or director
y in K:\apmxe\php5\PEAR\PEAR\Config.php on line 27
Fatal error: require_once(): Failed opening required 'PEAR.php' (include_path='D
:\apmxe\php5\pear') in K:\apmxe\php5\PEAR\PEAR\Config.php on line 27
看到是因为路径不同引起的,需要修改命令配置文件 K:\apmxe\php5\PEAR\pearcmd.php
在第32行,判断是否为PHP环境设置了PEAR的路径
if ('K:\apmxe\php5\pear' != '@'.'include_path'.'@') {
ini_set('include_path', 'K:\apmxe\php5\pear');
$raw = false;
} else {
将其中的路径修改为当前APMEX的安装路径即可。
命令行运行:pear list
代码K:\apmxe\php5>pear list
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
=========================================
PACKAGE VERSION STATE
Archive_Tar 1.3.2 stable
Console_Getopt 1.2.3 stable
PEAR 1.7.2 stable
Structures_Graph 1.0.2 stable
愉快的看到,已经安装好的PEAR程序列表
最后,更新,即可开始PEAR之旅
pear channel-update pear.php
PHP