gitignore
Questo commit è contenuto in:
parent
d065dc4857
commit
e910bc5f25
2 ha cambiato i file con 15 aggiunte e 0 eliminazioni
0
script/.htpassdb
File normale
0
script/.htpassdb
File normale
15
script/db.php
File normale
15
script/db.php
File normale
|
|
@ -0,0 +1,15 @@
|
|||
|
||||
<?php
|
||||
function read_password()
|
||||
{
|
||||
$real_path = __DIR__.DIRECTORY_SEPARATOR.".htpassdb";
|
||||
$file = fopen($real_path, "r") or die("Unable to open DB password file!");;
|
||||
$password = fgets($file);
|
||||
fclose($file);
|
||||
return trim($password);
|
||||
}
|
||||
|
||||
$host = "127.0.0.1";
|
||||
|
||||
$db = new PDO('mysql:host='.$host.';dbname=accueil_insa','root', read_password());
|
||||
?>
|
||||
Caricamento…
Crea riferimento in una nuova segnalazione