Advertisement
Guest User

Untitled

a guest
Jul 6th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.68 KB | None | 0 0
  1. <?php
  2. header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
  3. header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); // always modified
  4. header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
  5. header("Pragma: no-cache");             // HTTP/1.0
  6.  
  7.  
  8.  
  9.  
  10. $dbHost = "localhost";
  11. $dbUser = "xxx";
  12. $dbPass = "xxx";
  13. $dbName = "xxx";
  14.  
  15. session_start();
  16.  
  17. function connectDatabase()
  18. {
  19.   global $dbHost, $dbUser, $dbPass, $dbName;
  20.  
  21.   if (!($link = @mysql_connect($dbHost, $dbUser, $dbPass))) exit("Couldn't connect to database server");
  22.  
  23.   if (!@mysql_select_db($dbName, $link)) exit("Couldn't select $dbName database");
  24.  
  25.   @mysql_set_charset('utf8', $link);
  26. }
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement