duanou8504 2015-04-15 14:13
浏览 53
已采纳

从Pear安装类到PHP(Ubuntu)

I just wanted to install this class from Pear:

http://pear.php.net/package/Mail_mimeDecode/

After this command:

sudo pear install Mail_mimeDecode-1.5.5

I have this:

downloading Mail_mimeDecode-1.5.5.tgz ...
Starting to download Mail_mimeDecode-1.5.5.tgz (11,554 bytes)
.....done: 11,554 bytes
downloading Mail_Mime-1.8.9.tgz ...
Starting to download Mail_Mime-1.8.9.tgz (33,796 bytes)
...done: 33,796 bytes
install ok: channel://pear.php.net/Mail_Mime-1.8.9
install ok: channel://pear.php.net/Mail_mimeDecode-1.5.5

So everything looks fine. But when i want to use this class i got this error:

Class 'Mail_mimeDecode' not found

I try use it like this ($xml is a string with an XML inside):

$mime = new \Mail_mimeDecode($xml);

I also don't see it in my phpinfo Profiler. Am I missing something ? I work on Symfony2 Application if that changes anything...

  • 写回答

1条回答 默认 最新

  • dongyuan1983 2015-04-17 07:33
    关注

    You have to configure you PHP include path correctly. Check the PEAR installation section in the manual.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效