I've got script that uses the pear Mail class and have had problems on some
shared hosts with the include path to Mail. E.g., Blue Host insists the site
owner must change the php.ini file. I'd rather not expect them to do that.
Can you folks critique this approach for me.
if(EMAIL_MODE=='smtp'){
$basePath = str_ireplace('public_html', '', $_SERVER['DOCUMENT_ROOT']);
set_include_path(get_include_path() . PATH_SEPARATOR . basePath);
require_once "$basePath/php" . '/Mail.php';
$smtpStatus=(class_exists('Mail'))?true:false;
}
Thanks....
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php