Integration with ZF2
2017-03-20 10:52
190 查看
1. edit index.php
Yii::import('application.vendors.zf2.Loader.StandardAutoloader',
true);
Yii::registerAutoloader(array(new
Zend\Loader\StandardAutoloader(array('autoregister_zf' =>
true)), 'autoload'), true);
2. edit control.php
$mail = new Zend\Mail\Message();
$mail->setBody('This is the text of the
mail.')
->setFrom('prince.bi@gmail.com', 'Some Sender')
->addTo('jianbinbi@gmail.com', 'Some Recipient')
->setSubject('TestSubject');
$transport = new
Zend\Mail\Transport\Sendmail();
$transport->send($mail);
echo "OK";
Yii::import('application.vendors.zf2.Loader.StandardAutoloader',
true);
Yii::registerAutoloader(array(new
Zend\Loader\StandardAutoloader(array('autoregister_zf' =>
true)), 'autoload'), true);
2. edit control.php
$mail = new Zend\Mail\Message();
$mail->setBody('This is the text of the
mail.')
->setFrom('prince.bi@gmail.com', 'Some Sender')
->addTo('jianbinbi@gmail.com', 'Some Recipient')
->setSubject('TestSubject');
$transport = new
Zend\Mail\Transport\Sendmail();
$transport->send($mail);
echo "OK";
相关文章推荐
- ASP.NET 2.0: URL Mapping with RegEx Support
- Tip/Trick: Implement Copy Function with FormView and SqlDatasource
- how to do with a slow oracle dat…
- poj 3468 A Simple Problem with I…
- Cool Tips and Tricks with ASP.NET 2.0 posted by Scott
- CSS: color style solution with css contexual selectors
- Working with Web Resources in ASP.NET 2.0
- import dump with error ORA-600[K…
- HDU 2578 Dating with girls(1)
- How to install packages with apt…
- Tip/Trick: ASP.NET 2.0 Deal with DBNull value when bind to RadioButtonList/当绑定RadioButtonL
- Cool Tips and Tricks with ASP.NET 2.0 posted by Scott
- Working with Web Resources in ASP.NET 2.0
- (转)ORACLE WITH AS 用法
- Continuous Integration with Jenkins & Selenium2
- Tip/Trick: ASP.NET 2.0 Deal with DBNull value when bind to RadioButtonList/当绑定RadioButtonL
- ASP.NET 2.0 Language Swithcer and Theme Swicher 多语言转换和多样式主题转换
- Efficient Data Paging and Sorting with ASP.NET 2.0 and SQL 2005
- poj 2996 Help Me with the Game
- [转] Playing with ptrace, Part I…