Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialStan Byford
9,387 PointsPHPmailer not found
When trying to access the suggest page I receive the following errors, have tried other answers from students but nothing working.
Warning: require(../vendor/phpmailer/src/PHPMailer.php): failed to open stream: No such file or directory in /home/treehouse/workspace/suggest.php on line 4
Fatal error: require(): Failed opening required '../vendor/phpmailer/src/PHPMailer.php' (include_path='.:/usr/share/php') in /home/treehouse/workspace/suggest.php on line 4
The code I am currently using...
use PHPMailer\PHPMailer\PHPMailer; require '../vendor/phpmailer/src/PHPMailer.php'; require '../vendor/phpmailer/src/Exception.php';
Stan Byford
9,387 PointsThanks for looking, here's the snapshot https://w.trhou.se/bqy49jkksh I have tried other solutions offered but nothing seems to work, I have checked the code over but perhaps I have missed something.
2 Answers
<noob />
17,062 PointsI have been struggling with the video as well the code is broken. i have posted a solution in my discussion.
Stan Byford
9,387 PointsThanks, I'll check it out. Do you have a link to your discussion?
Stan Byford
9,387 PointsI found the issue, don't trust treehouse code trust your instincts. The path in the treehouse code is ../vendor/phpmailer/src/PHPMailer.php it should be just vendor/phpmailer/src/PHPMailer.php omitting the ../ from the front of the pathname allowed it to work.
<noob />
17,062 Pointsglad u solve it. i also found that the code she wrote isn't working anyways.
KRIS NIKOLAISEN
54,971 PointsKRIS NIKOLAISEN
54,971 PointsCan you post a snapshot? Click the camera icon in the upper right corner, then 'Take Snapshot', then post the link created here.