PHPMailer不发送任何邮件

时间:2019-01-20 16:42:54

标签: php phpmailer contact-form

我在我的网站上使用PHPMailer,但是它不起作用。 在我的普通代码中,不会出现任何错误,因为它已经起作用了。 我认为错误出在htaccess中,因为我使用它来删除网址中的.php,但我排除了PHPMailer.php文件。

这是错误日志:

[20-Jan-2019 17:11:18 UTC] PHP Warning:  require(PHPMailer.php): failed to open stream: No such file or directory in /home/kd41443/public_html/impressum_und_kontakt.php on line 235
[20-Jan-2019 17:11:18 UTC] PHP Fatal error:  require(): Failed opening required 'PHPMailer.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/kd41443/public_html/impressum_und_kontakt.php on line 235
[20-Jan-2019 17:11:37 UTC] PHP Warning:  require(PHPMailer.php): failed to open stream: No such file or directory in /home/kd41443/public_html/impressum_und_kontakt.php on line 235
[20-Jan-2019 17:11:37 UTC] PHP Warning:  require(PHPMailer.php): failed to open stream: No such file or directory in /home/kd41443/public_html/impressum_und_kontakt.php on line 235
[20-Jan-2019 17:11:37 UTC] PHP Fatal error:  require(): Failed opening required 'PHPMailer.php' (include_path='.:/opt/cpanel/ea-php72/root/usr/share/pear') in /home/kd41443/public_html/impressum_und_kontakt.php on line 235
[20-Jan-2019 17:13:09 UTC] PHP Fatal error:  Uncaught Error: Class 'PHPMailer' not found in /home/kd41443/public_html/impressum_und_kontakt.php:242
Stack trace:
#0 {main}
  thrown in /home/kd41443/public_html/impressum_und_kontakt.php on line 242

.htaccess文件中可能有错误?

    RewriteEngine on
RewriteOptions inherit
RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index$ "https\:\/\/www\.kruemelopment\-dev\.de\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^kruemelopment\-dev\.de$ [OR]
RewriteCond %{HTTP_HOST} ^www\.kruemelopment\-dev\.de$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^index\.html$ "https\:\/\/www\.kruemelopment\-dev\.de\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^kruemelopment\-dev\.de$ [OR]
RewriteCond %{HTTP_HOST} ^www\.kruemelopment\-dev\.de$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^bilder\/?$ "https\:\/\/www\.kruemelopment\-dev\.de\/" [R=301,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^errorpages$ "https\:\/\/www\.kruemelopment\-dev\.de\/" [R=301,L]
ErrorDocument 404 /errorpages/error404.html
ErrorDocument 401 /errorpages/error401.html
ErrorDocument 403 /errorpages/error403.html
ErrorDocument 400 /errorpages/error400.html
ErrorDocument 451 /errorpages/error451.html
ErrorDocument 503 /errorpages/error503.html
ErrorDocument 504 /errorpages/error504.html
ErrorDocument 505 /errorpages/error505.html
RewriteCond %{HTTP_HOST} ^.*$
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^screenshots$ "https\:\/\/www\.kruemelopment\-dev\.de\/" [R=301,L]
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !PHPMailer\.php
RewriteRule ^([^\.]+)$ $1.php [NC,L]

0 个答案:

没有答案