Guest User

Untitled

a guest
Jun 29th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. if (!YII_ENV_TEST) {
  2. $config['components']['db']['dsn'] = 'mysql:host=localhost;dbname=default';
  3. $config['components']['db']['username'] = 'root';
  4. $config['components']['db']['password'] = '';
  5. } else {
  6. $config['components']['db']['dsn'] = 'mysql:host=production;dbname=default';
  7. $config['components']['db']['username'] = 'root';
  8. $config['components']['db']['password'] = '';
  9. }
  10.  
  11. <?php
  12. return [
  13. 'components' => [
  14. 'db' => [
  15. 'class' => 'yiidbConnection',
  16. 'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
  17. 'username' => 'root',
  18. 'password' => '',
  19. 'charset' => 'utf8',
  20. ],
  21. 'mailer' => [
  22. 'class' => 'yiiswiftmailerMailer',
  23. 'viewPath' => '@common/mail',
  24. // send all mails to a file by default. You have to set
  25. // 'useFileTransport' to false and configure a transport
  26. // for the mailer to send real emails.
  27. 'useFileTransport' => true,
  28. ],
  29. ],
  30. ];
  31.  
  32. <?php
  33. return [
  34. 'components' => [
  35. 'db' => [
  36. 'class' => 'yiidbConnection',
  37. 'dsn' => 'mysql:host=localhost;dbname=y2',
  38. 'username' => 'root',
  39. 'password' => '',
  40. 'charset' => 'utf8',
  41. ],
  42. 'mailer' => [
  43. 'class' => 'yiiswiftmailerMailer',
  44. 'viewPath' => '@common/mail',
  45. // send all mails to a file by default. You have to set
  46. // 'useFileTransport' to false and configure a transport
  47. // for the mailer to send real emails.
  48. 'useFileTransport' => true,
  49. ],
  50. ],
  51. ];
  52.  
  53. <?php
  54. return [
  55. 'components' => [
  56. 'db' => [
  57. 'class' => 'yiidbConnection',
  58. 'dsn' => 'mysql:host=test.mysql.ukraine.com.ua;dbname=benzinof_yii',
  59. 'username' => 'test_yii',
  60. 'password' => '76dk9fkr',
  61. 'charset' => 'utf8',
  62. ],
  63. 'mailer' => [
  64. 'class' => 'yiiswiftmailerMailer',
  65. 'viewPath' => '@common/mail',
  66. // send all mails to a file by default. You have to set
  67. // 'useFileTransport' to false and configure a transport
  68. // for the mailer to send real emails.
  69. 'useFileTransport' => true,
  70. ],
  71. ],
  72. ];
Add Comment
Please, Sign In to add comment