Heim  >  Artikel  >  Backend-Entwicklung  >  PHP中pear 的安装问题,无法调用mail.php?

PHP中pear 的安装问题,无法调用mail.php?

WBOY
WBOYOriginal
2016-06-06 20:38:01992Durchsuche

安装教程:http://www.cnblogs.com/Excellent/archive/2011/11/22/2258304.html
当使用后面的测试代码是报错。Warning: require_once(Mail.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\phpDemo\index.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Mail.php' (include_path='.;C:\php5\pear') in C:\wamp\phpDemo\index.php on line 2
而查看phpinfo时发现"include_path .;C:\php5\pear" 而我的include_path中已经改了。求大神解答。

回复内容:

安装教程:http://www.cnblogs.com/Excellent/archive/2011/11/22/2258304.html
当使用后面的测试代码是报错。Warning: require_once(Mail.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\phpDemo\index.php on line 2

Fatal error: require_once() [function.require]: Failed opening required 'Mail.php' (include_path='.;C:\php5\pear') in C:\wamp\phpDemo\index.php on line 2
而查看phpinfo时发现"include_path .;C:\php5\pear" 而我的include_path中已经改了。求大神解答。

教程的方法是对的,但是不能完全照它操作,可能是PEAR版本升级了,我安装后也是没有Mail这个包的,如下

E:\wamp\bin\php\php5.5.12>pear list
INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:

=========================================
PACKAGE VERSION STATE
Archive_Tar 1.3.12 stable
Console_Getopt 1.3.1 stable
PEAR 1.9.5 stable
PHP_CodeSniffer 2.2.0 stable
Structures_Graph 1.0.4 stable
XML_Util 1.2.3 stable

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn