Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. GNU nano 2.7.4 File: index.php
  2. <html>
  3. <head><title>Welcome to my excellent blog</title></head>
  4. <body>
  5. <h1>Welcome to JOSE </h1>
  6. <?php
  7. $dbserver = "35.225.20.165";
  8. $dbuser = "blogdbuser";
  9. $dbpassword = "root";
  10. // In a production blog, we would not store the MySQL
  11. // password in the document root. Instead, we would store it in a
  12. // configuration file elsewhere on the web server VM instance.
  13. $conn = new mysqli($dbserver, $dbuser, $dbpassword);
  14. if (mysqli_connect_error()) {
  15. echo ("Database connection failed: " . mysqli_connect_error());
  16. } else {
  17. echo ("Database connection succeeded.");
  18. }
  19. ?>
  20. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement