i'm using phpmailer and my code work juts fine on the localhost
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer\src\Exception.php';
require 'PHPMailer\src\PHPMailer.php';
require 'PHPMailer\src\SMTP.php';
but when i upload this to my host the error log says:
[08-Dec-2018 19:20:13 Europe/Madrid] PHP Warning: require(PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 6 [08-Dec-2018 19:20:13 Europe/Madrid] PHP Warning: require(PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 6 [08-Dec-2018 19:20:13 Europe/Madrid] PHP Fatal error: require(): Failed opening required 'PHPMailer\src\Exception.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ilefyaiq/public_html/formulario.php on line 6 [08-Dec-2018 19:35:18 Europe/Madrid] PHP Warning: require(PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 6 [08-Dec-2018 19:35:18 Europe/Madrid] PHP Warning: require(PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 6 [08-Dec-2018 19:35:18 Europe/Madrid] PHP Fatal error: require(): Failed opening required 'PHPMailer\src\Exception.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ilefyaiq/public_html/formulario.php on line 6 [08-Dec-2018 21:10:34 Europe/Madrid] PHP Warning: require(/home/ilefyaiq/public_htmlPHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:10:34 Europe/Madrid] PHP Fatal error: require(): Failed opening required '/home/ilefyaiq/public_htmlPHPMailer\src\Exception.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:13:30 Europe/Madrid] PHP Warning: require(\PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:13:30 Europe/Madrid] PHP Warning: require(\PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:13:30 Europe/Madrid] PHP Fatal error: require(): Failed opening required '\PHPMailer\src\Exception.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:14:29 Europe/Madrid] PHP Warning: require(\PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:14:29 Europe/Madrid] PHP Warning: require(\PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:14:29 Europe/Madrid] PHP Fatal error: require(): Failed opening required '\PHPMailer\src\Exception.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:17:37 Europe/Madrid] PHP Warning: require(/home/ilefyaiq/public_html\PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:17:37 Europe/Madrid] PHP Fatal error: require(): Failed opening required '/home/ilefyaiq/public_html\PHPMailer\src\Exception.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:19:58 Europe/Madrid] PHP Parse error: syntax error, unexpected '/', expecting identifier (T_STRING) or function (T_FUNCTION) or const (T_CONST) or \ (T_NS_SEPARATOR) in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:21:39 Europe/Madrid] PHP Warning: The use statement with non-compound name 'PHPMailer' has no effect in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:21:39 Europe/Madrid] PHP Parse error: syntax error, unexpected '/', expecting ',' or ';' in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:26:51 Europe/Madrid] PHP Warning: The use statement with non-compound name 'PHPMailer' has no effect in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:26:51 Europe/Madrid] PHP Parse error: syntax error, unexpected '/', expecting ',' or ';' in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:31:17 Europe/Madrid] PHP Warning: The use statement with non-compound name 'PHPMailer' has no effect in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:31:17 Europe/Madrid] PHP Parse error: syntax error, unexpected '/', expecting ',' or ';' in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:31:29 Europe/Madrid] PHP Warning: The use statement with non-compound name 'PHPMailer' has no effect in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:31:29 Europe/Madrid] PHP Parse error: syntax error, unexpected '/', expecting ',' or ';' in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:40:59 Europe/Madrid] PHP Warning: The use statement with non-compound name 'PHPMailer' has no effect in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:40:59 Europe/Madrid] PHP Parse error: syntax error, unexpected '/', expecting ',' or ';' in /home/ilefyaiq/public_html/formulario.php on line 5 [08-Dec-2018 21:41:47 Europe/Madrid] PHP Parse error: syntax error, unexpected 'header' (T_STRING) in /home/ilefyaiq/public_html/formulario.php on line 119 [08-Dec-2018 21:42:09 Europe/Madrid] PHP Parse error: syntax error, unexpected 'header' (T_STRING) in /home/ilefyaiq/public_html/formulario.php on line 119 [08-Dec-2018 21:42:47 Europe/Madrid] PHP Warning: require(PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:42:47 Europe/Madrid] PHP Warning: require(PHPMailer\src\Exception.php): failed to open stream: No such file or directory in /home/ilefyaiq/public_html/formulario.php on line 11 [08-Dec-2018 21:42:47 Europe/Madrid] PHP Fatal error: require(): Failed opening required 'PHPMailer\src\Exception.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ilefyaiq/public_html/formulario.php on line 11
so i've tried changing the '\' to '/' but or putting __ dir __. before the paths but nothing is working. thanks in advice.
'/home/ilefyaiq/public_htmlPHPMailer\src\Exception.php'. That’s enough to kill it.