Disable access.php by default
This commit is contained in:
parent
02d23237d4
commit
e56c0568b5
2 changed files with 7 additions and 0 deletions
|
@ -1,6 +1,11 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
include_once("config.php");
|
include_once("config.php");
|
||||||
|
|
||||||
|
if (!$access) {
|
||||||
|
die("Access not enabled in configuration file. Make sure that this page is not public before enabling it.");
|
||||||
|
}
|
||||||
|
|
||||||
$conn = new mysqli($servername, $username, $password, $dbname);
|
$conn = new mysqli($servername, $username, $password, $dbname);
|
||||||
|
|
||||||
if ($conn->connect_error) {
|
if ($conn->connect_error) {
|
||||||
|
|
|
@ -4,3 +4,5 @@ $servername = "localhost";
|
||||||
$username = "username";
|
$username = "username";
|
||||||
$password = "password";
|
$password = "password";
|
||||||
$dbname = "database";
|
$dbname = "database";
|
||||||
|
|
||||||
|
$access = False;
|
||||||
|
|
Loading…
Reference in a new issue