I have, what I believe to be, a simple question. I have created a file called sendmail.php which only contains the following include statement: <?php include('C:\HSphere.NET\3rdparty\PHP\5.2.5\PEAR\Mail\Mail.php'); ?> This directory was given to me by my hosting company. When I browse to this file (http://.........sendmail.php) then it should not give me the following error Fatal error: Class 'Mail' not found in C:\HSphere.NET\3rdparty\PHP\5.2.5\PEAR\Mail\mail.php on line 26 Am I correct? I'm just trying to prove to my hosting provider that their setup is wrong. Thanks for any guidance you can provide.
Your directory name is not resolving thus the error. What you need to ensure is that server has access to the file that needs to be included. I am surprise by the Directory structure - apparently a windows hosting, but typically the files are stored in IIS / apache root not on C Drive Need more inputs mate.
I cannot see the file astrazone. that's a good thought. I should be able to. Mail.php is not a file that I wrote, it is just a file I am attempting to access. Thanks for the extra comments pubdomainshosts. I've contacted my host provider with these questions. It makes logical sense that IIS / apache should have access to this file...and I need to know where they (iis/apache) can find them. It is a windows installation I'm pretty sure. thank you for the thoughts. I've sent my hosting provider these questions/thoughts. .
Try this mail('youremail@yourdomain.com', 'subject', 'test message'); Code (markup): If that works without error and you end up sending an email to yourself, then you already got the sendmail module loaded in the php.ini. Also far as mail.php goes, if its on a site you own (ie: in the same account) you could access it via relative path instead of direct path like you're trying to do. To see where your home folder truely lies, create a php.php file, inside of that have <? phpinfo(); ?> goto that page then scroll down to find the document root, that'll tell you your actual logical path.
Also a note on the use of include(), file_get_contents() etc etc. IF the php file is not on the same account as the php script you are trying to access it from, then you won't receive the content of the php file, only the generated content (such as when a browser goes to it) which in your case could be blank. If one account could see the content of another account's php file, that would be a serious security risk.