MastodonStartpage/web/admin/include/myconn.php
2019-12-28 22:51:41 +01:00

9 lines
448 B
PHP

<?php
$iniarr=parse_ini_file('sec/mastostartadmin.ini')
or muoribene('Impossibile aprire il file di configurazione.<br>'.$btl,false);
$link=mysqli_connect($iniarr['db_host'],$iniarr['db_admin_name'],$iniarr['db_admin_password'],$iniarr['db_name'],$iniarr['db_port'],$iniarr['db_socket'])
or muoribene('Impossibile connettersi al database: '.mysqli_connect_error().' ['.mysqli_connect_errno().']',false);
mysqli_set_charset($link,'utf8mb4');
?>