PHP 路径包含问题
我遇到以下问题:
Warning: include_once() [function.include]: Failed opening 'Mail_Mime/mime.php' for
inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myUserName/public_html/ssp/php/send-email-form.php on line 5
在我的 php 页面顶部,我有以下内容:
include_once('Mail.php');
include_once('Mail_Mime/mime.php');
更新:Cpanel 说我的 php 扩展位于 /home/cloudbit/php 我可以在 /home/USERNAME 中看到 mime.php 和 mail.php /php/mail/
知道我如何基本上告诉它使用错误中提到的路径吗?这是新的。
谢谢 标记
I am having the following problem:
Warning: include_once() [function.include]: Failed opening 'Mail_Mime/mime.php' for
inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myUserName/public_html/ssp/php/send-email-form.php on line 5
At the top of my php page I have the following:
include_once('Mail.php');
include_once('Mail_Mime/mime.php');
Update: Cpanel says my php extensions are located at /home/cloudbit/php I can see mime.php and mail.php in /home/USERNAME/php/mail/
Any idea how I basically tell it to use that path mentioned in the error? New to this.
Thanks
Mark
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
那么你的包含应该如下所示:
Then your include should look as follows:
我通过在运行时添加包含路径在我的托管提供商处解决了完全相同的问题。我的 PHP 文件位于
~/www/
中,但 PEAR 模块位于~/php/
中。请参阅此链接:PHP 手册
希望这对那里的人有帮助。
I solved this exact same problem at my hosting provider by adding the include path at runtime. My PHP files were in
~/www/
, but the PEAR modules were in~/php/
.See this link: PHP Manual
Hope this helps someone out there.