auth.php 941 B

12345678910111213141516171819202122232425262728293031323334
  1. <?
  2. /**
  3. * $link можно получить с помощью \app\models\Doctrine::getLink()
  4. * В топку функциАнальное программирование
  5. */
  6. $test['host']='dmatter.net';
  7. $test['db']='promsystem_test';
  8. $test['user']='promsystem';
  9. $test['pass']='PrmSystem212';
  10. $dmatter['host']='dmatter.net';
  11. $dmatter['db']='promsystem2';
  12. $dmatter['user']='promsystem';
  13. $dmatter['pass']='PrmSystem212';
  14. $auth = $dmatter;
  15. //$auth = $local;
  16. //$auth = $handy;
  17. //function mysqlConnect()
  18. //{
  19. // global $db_hostname, $db_username, $db_password, $db_name, $auth, $dmatter;
  20. $db_hostname=$auth['host'];
  21. $db_username=$auth['user'];
  22. $db_password=$auth['pass'];
  23. $db_name=$auth['db'];
  24. $link = mysqli_connect($db_hostname,$db_username,$db_password);
  25. mysqli_select_db($link, $db_name);
  26. mysqli_query($link,"SET NAMES utf8");
  27. mysqli_query($link,"SET time_zone = '+03:00';");
  28. //mysql_query("SET lc_time_names = 'ru_RU'");
  29. //}