shish vor 6 Jahren
Ursprung
Commit
95a7d2c772
2 geänderte Dateien mit 32 neuen und 0 gelöschten Zeilen
  1. 28 0
      common/config/main-local.php
  2. 4 0
      common/config/params-local.php

+ 28 - 0
common/config/main-local.php

@@ -0,0 +1,28 @@
+<?php
+return [
+    'components' => [
+        'mailer' => [
+	        'class' => 'yii\swiftmailer\Mailer',
+	        'useFileTransport' =>false,//false发送邮件,true只是生成邮件在runtime文件夹下,不发邮件
+	        'transport' => [
+		        'class' => 'Swift_SmtpTransport',
+		        'host' => 'smtp.126.com',  //每种邮箱的host配置不一样
+		        'username' => 'zhhinc@126.com',
+		        'password' => '',
+		        'port' => '25',
+		        'encryption' => 'tls',
+	        ],
+	        'messageConfig'=>[
+	        'charset'=>'UTF-8',
+	        		'from'=>['zhhinc@126.com'=>'系统邮件']
+	        ],
+        ],
+	    'db' => [
+		    'class' => 'yii\db\Connection',
+		    'dsn' => 'mysql:host=127.0.0.1;dbname=huahuibao',
+		    'username' => 'root',
+		    'password' => 'zt20152008',
+		    'charset' => 'utf8',
+	    ],
+    ],
+];

+ 4 - 0
common/config/params-local.php

@@ -0,0 +1,4 @@
+<?php
+return [
+];
+