您的位置:首页 > 其它

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";
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐