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.

 $basePath = str_ireplace('public_html', '', $_SERVER['DOCUMENT_ROOT']);
 set_include_path(get_include_path() . PATH_SEPARATOR . basePath);
 require_once "$basePath/php" . '/Mail.php';


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to