how excatly do i make t work ? I need to use the Zend framework for sending mails. But im unable to include the framework proberly in my php file. the problem might be caused by the fact im using a shared hosting service.
I have done the following
- downloaded a linux tgz distribution with the framework in version 2.x.
- unzipped it and uploaded the folder via. ftp to my shared hosting.
- I placed the Zend folder in the root.
I dont have acces to the php.ini file, so i created a new one with the following content.
safe_mode = off SMTP = localhost smtp_port = 26 sendmail_from = web15.meebox.net include_path = /home/sammensp/public_html/Zend/libraryI placed the following code into a php file to test if the framework worked.
require_once 'Zend/Mail/Message.php'; use Zend\Mail; $mail = new Mail\Message(); $mail->setBody('This is the text of the email.'); $mail->setFrom('[email protected]', 'Sender\'s name'); $mail->addTo('[email protected]', 'Name o. recipient'); $mail->setSubject('TestSubject'); $transport = new Mail\Transport\Sendmail(); $transport->send($mail);
the problem is that it doesnt work i get the following errors.
Warning: require_once(Zend/Mail/Message.php) [<a href='function.require-
once'>function.require-once</a>]: failed to open stream: No such file or directory in
/home/sammensp/public_html/mobile/test.php on line 23
Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed
opening required 'Zend/Mail/Message.php'
(include_path='/home/sammensp/public_html/Zend/library') in
/home/sammensp/public_html/mobile/test.php on line 23
my web app and the test.php file is located at /public_html/mobile/test.php i have set the include path to the following include_path = /home/sammensp/public_html/Zend/library
can you help me with a solution to what i have done wrong and how i fix it ?
set_include_path(). - Niko