gopear 的安装问题

有许多朋友也遇到了很多问题,关于php的,自己虽然是新手,但是最喜欢的祖宗的一句话是“好读书,不求甚解,每有会意,便欣然忘食”;

安装pear的时候,常常会遇到这样的问题,安装过程是直接点击php根目录下的go-pear.bat,结果出现以下这样的提示:

phar "D:\PHPEV\php5.3\PEAR\go-pear.phar" does not have a signaturePHP Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: phar error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in D:\PHPEV\php 5.3\PEAR\go-pear.phar on line 1236
Warning: require_once(phar://go-pear.phar/index.php): failed to open stream: pha r error: invalid url or non-existent phar "phar://go-pear.phar/index.php" in D:\ PHPEV\php5.3\PEAR\go-pear.phar on line 1236 请按任意键继续. . .

我也没有明白为什么会是这样了,现在反正已经解决了,就把解决的方法放在这里,供大家参考

1.http://pear.php.net/go-pear 把内容存成php文件,放到你本地网站里,然后用浏览器访问这个php文件。或者用php命令行访问。

2.将安装的根目录放在系统变量中,以便可以使用命令行直接访问。我的目录是d:\pear


3.将D:\Pear\PEAR加入php.ini

; Windows: "\path1;\path2"
include_path = ".;D:\Pear\PEAR"

安装完成之后的命令行访问示意

完工 ......OK

原文地址:https://www.cnblogs.com/imvkmark/p/2291498.html