https://github.com/netyum/yii2-blog
cd yii2-blog
composer install
#初始化数据
php yii mirgate
通常向web目录指向yii2-blog/web即可,需要配置一个yii2-blog/config/mail.php, 设置一个你的smtp
<?php
return [
'class' => 'yii\swiftmailer\Mailer',
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => '', //smtp服务器
'username' => '', //帐号
'password' => '', //密码
'port' => '', //对应端口
'encryption' => 'tls', //发送协议
],
'messageConfig' => [
'charset' => 'UTF-8',
// ['email'=>'name']
//'from' => ['' => ''] //email发送时使用的,email地址即和上面的smtp一样,后面的name随便,别人收后看到的是name
]
];
默认管理员帐号是 [email protected] 密码是 yiibook