PHPMailer v6.9.3 hinzufügen – behebt Fatal Error auf Server
- PHPMailer-Quelldateien (PHPMailer.php, SMTP.php, Exception.php) zum Repository hinzugefügt - .gitignore angepasst: vendor/phpmailer/ und vendor/autoload.php ausgenommen - Behebt: 'Failed to open stream: No such file or directory' für autoload.php
This commit is contained in:
18
vendor/autoload.php
vendored
Normal file
18
vendor/autoload.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
/**
|
||||
* Simple Autoloader für PHPMailer
|
||||
* Falls Composer nicht verfügbar ist
|
||||
*/
|
||||
|
||||
spl_autoload_register(function ($class) {
|
||||
// Nur PHPMailer-Klassen laden
|
||||
if (strpos($class, 'PHPMailer\\PHPMailer\\') === 0) {
|
||||
// Namespace in Dateipfad umwandeln
|
||||
$classPath = str_replace('PHPMailer\\PHPMailer\\', '', $class);
|
||||
$file = __DIR__ . '/vendor/phpmailer/phpmailer/src/' . $classPath . '.php';
|
||||
|
||||
if (file_exists($file)) {
|
||||
require $file;
|
||||
}
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user