致命错误:在 xampp 中使用 pear 找不到类 [英] Fatal error: class not found using pear in xampp

查看:85
本文介绍了致命错误:在 xampp 中使用 pear 找不到类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用表单数据发送电子邮件.我正在调整 http://www.html-form-guide.com/email-form/php-email-form-attachment.html 使用 PEAR 库.我正在通过 XAMPP 在本地测试我的网站.

I'm trying to send an email using form data. I'm adapting the method described at http://www.html-form-guide.com/email-form/php-email-form-attachment.html which uses the PEAR library. I'm testing my site locally via XAMPP.

这是我页面顶部的代码:

Here's the code from the top of my page:

<?php 
// Pear library includes
include_once('Mail/mail.php');
include_once('Mail/mime.php');

测试页面产生以下结果:

Testing the page produces the following:

致命错误:在第 51 行的 C:\xampp\php\PEAR\Mail\mail.php 中找不到 Class 'Mail'

Fatal error: Class 'Mail' not found in C:\xampp\php\PEAR\Mail\mail.php on line 51

这是 mail.php 中的第 51 行(我没有更改默认 XAMPP 安装中的文件):

Here's line 51 from mail.php (I haven't altered the file from the default XAMPP installation):

class Mail_mail extends Mail {

任何帮助将不胜感激.

推荐答案

尝试改变

include_once('Mail/mail.php');

include_once('Mail.php');

这篇关于致命错误:在 xampp 中使用 pear 找不到类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆