Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GNU nano 2.7.4 File: index.php
- <html>
- <head><title>Welcome to my excellent blog</title></head>
- <body>
- <h1>Welcome to JOSE </h1>
- <?php
- $dbserver = "35.225.20.165";
- $dbuser = "blogdbuser";
- $dbpassword = "root";
- // In a production blog, we would not store the MySQL
- // password in the document root. Instead, we would store it in a
- // configuration file elsewhere on the web server VM instance.
- $conn = new mysqli($dbserver, $dbuser, $dbpassword);
- if (mysqli_connect_error()) {
- echo ("Database connection failed: " . mysqli_connect_error());
- } else {
- echo ("Database connection succeeded.");
- }
- ?>
- </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement