hoopplaya4 Posted June 12, 2008 Share Posted June 12, 2008 Hey all: I need some help with my path in my PHP. I keep getting the error: Warning: require(/phpmailer/class.phpmailer.php) [function.require]: failed to open stream: No such file or directory in /home/content/r/w/i/rwigvh/html/dev/reservation.php on line 33 Fatal error: require() [function.require]: Failed opening required '/phpmailer/class.phpmailer.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/r/w/i/rwigvh/html/dev/reservation.php on line 33 At the beginning of the php doc I'm putting in: require('/tcpdf/phpmailer/class.phpmailer.php'); require_once('/tcpdf/config/lang/eng.php'); require_once('/tcpdf/tcpdf.php'); This PHP document is located in: www.website.com/dev/ And I am try to have the require functions point to: www.website.com/dev/tcpdf/phpmailer/class.phpmailer.php www.website.com/dev/tcpdf/config/lang/eng.php www.website.com/dev/tcpdf/tcpdf.php What am I doing wrong? Thanks! Link to comment https://forums.phpfreaks.com/topic/109986-solved-php-path/ Share on other sites More sharing options...
DarkWater Posted June 12, 2008 Share Posted June 12, 2008 Take out the / BEFORE the filepath, because it thinks you want the root of the filesystem. IE: require('tcpdf/phpmailer/class.phpmailer.php'); Link to comment https://forums.phpfreaks.com/topic/109986-solved-php-path/#findComment-564382 Share on other sites More sharing options...
hoopplaya4 Posted June 13, 2008 Author Share Posted June 13, 2008 Thank you! Worked great! I'm terrible with paths. Link to comment https://forums.phpfreaks.com/topic/109986-solved-php-path/#findComment-564437 Share on other sites More sharing options...
DarkWater Posted June 13, 2008 Share Posted June 13, 2008 Any time. =) Link to comment https://forums.phpfreaks.com/topic/109986-solved-php-path/#findComment-564445 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.