require_once "Composer/PHPMailer/vendor/phpmailer/phpmailer/src/autoload.php";
You need to define a
composer.json file for your project, so lets say you make your project in /home/hyperspace/public_html (though note that having library files within your web root is generally bad). cd into that directory and run composer require phpmailer/phpmailer. That will create a composer.json file, a composer.lock file, and a folder called vendor containing a PHPMailer folder and some scripts, one of which will be called autoload.php. Then, in your contact.php script you would load the autoloader like this:require 'vendor/autoload.php';
0 comments:
Post a Comment
Thanks