Pear include path problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux