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...

图片转代码服务由CSDN问答提供 功能建议

我只是想从Pear安装这个类:

http://pear.php.net/package/Mail_mimeDecode/ < p>执行此命令后:

  sudo pear install Mail_mimeDecode-1.5.5 
   
 
 

我有:< / p>

 下载Mail_mimeDecode-1.5.5.tgz ... 
开始下载Mail_mimeDecode-1.5.5.tgz(11,554字节)
 .....完成:11,554字节 
下载Mail_Mime-1.8.9.tgz ... 
开始下载Mail_Mime-1.8.9.tgz(33,796字节)
 ...已完成:33,796字节
:n ok:channel://pear.php.net/  Mail_Mime-1.8.9 
 install ok:channel://pear.php.net/Mail_mimeDecode-1.5.5 
   
 
 

所以一切都很好。 但是,当我想使用这个类时,我遇到了这个错误:

 未找到类'Mail_mimeDecode'
   
 
 

我尝试使用它($ xml是一个带有XML的字符串):

  $ mime = new \ Mail_mimeDecode($ xml); 
  <  / pre> 
 
 

我也没有在我的phpinfo Profiler中看到它。 我错过了什么? 如果改变了什么,我会在Symfony2应用程序上工作......

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题