Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. <?php
  2. $file_name = "config.php";
  3. $file_handle = fopen($file_name, 'w') or die("Can't open file");
  4. $text = '$DBHOST = "'.$_POST['DBHOST']'";';
  5. $text .= '$DBUSER = "'.$_POST['DBUSER']'";';
  6. $text .= '$DBPASS = "'.$_POST['DBPASS']'";';
  7. $text .= 'mysql_connect($DBHOST,$DBUSER,$DBPASS);';
  8. fwrite($file_handle, $text);
  9. fclose($file_handle);
  10. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement