Jaap Marcus 3 лет назад
Родитель
Сommit
ad460d1724
1 измененных файлов с 10 добавлено и 0 удалено
  1. 10 0
      web/api/index.php

+ 10 - 0
web/api/index.php

@@ -1,5 +1,15 @@
 <?php
 use function Hestiacp\quoteshellarg\quoteshellarg;
+
+try {
+    require_once './inc/vendor/autoload.php';
+} catch (Throwable $ex) {
+    $errstr = 'Unable able to load required libraries. Please run v-add-sys-phpmailer in command line. Error: ' . $ex->getMessage();
+    trigger_error($errstr);
+    echo $errstr;
+    exit(1);
+}
+
 //die("Error: Disabled");
 define('HESTIA_DIR_BIN', '/usr/local/hestia/bin/');
 define('HESTIA_CMD', '/usr/bin/sudo /usr/local/hestia/bin/');