First things first, my site is hosted on a Linux CentOS server and it already has the complete PEAR package in /usr/share/PEAR. I have written a send mail script using smtp and I want to include the server's PEAR/Mail.php in sendMail.php. Below is the site root structure:
Site:
/var/www/html/buxx/
SendMail/
index.php
sendMail.php
PEAR on Server
/usr
/share
/PEAR
/Mail.php
I've tried to use
set_include_path(".:/usr/share/PEAR/")
,
realpath(/usr/share/PEAR/Mail.php)
and
include_once("/usr/share/PEAR/")
but I keep getting errors like
[ERROR] include_once(): Failed opening '' for inclusion (include_path='.:/usr/share/pear') in /var/www/html/buxx/SendMail/sendMail.php
how do I include the absolute path to Mail.php in sendMail.php or is there any other way around this?
Many Thanks