someguy321 Posted November 12, 2010 Share Posted November 12, 2010 I want to use PEAR if it's installed and the regular "mail()" function if not. But to check for PEAR being installed, I can't check for the class PEAR existing because I have to include "Mail.php" first. The problem is that even though this statement works perfectly: include_once "Mail.php"; This will ALWAYS be false: if ( file_exists( "Mail.php" ) ) ... So how do I check for PEAR? If I just include the file, it throws a warning error that I can't seem to catch in a try..catch. Link to comment https://forums.phpfreaks.com/topic/218525-how-either-check-pear-installed-or-catch-include_once-statement/ Share on other sites More sharing options...
trq Posted November 12, 2010 Share Posted November 12, 2010 If I just include the file, it throws a warning error that I can't seem to catch in a try..catch. include* does not generate any error if it didn't work. Post your code. Link to comment https://forums.phpfreaks.com/topic/218525-how-either-check-pear-installed-or-catch-include_once-statement/#findComment-1133666 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.