make conffile compatible with other dialects (specifically sqlite)

This commit is contained in:
M. Gardner 2019-07-28 14:43:31 +03:00
parent aabb35f932
commit b49373dace
2 changed files with 5 additions and 4 deletions

View File

@ -1,13 +1,14 @@
;<?php
;die();
;/*
; format:
; $dsn=$conffile["dialect"].':host='.$conffile["host"].';dbname='.$conffile["dbname"].';charset='.$conffile["charset"];
dsn="host=localhost;dbname=web;charset=utf8mb4"
dialect="mysql"
host="localhost"
user="web"
password=""
dbname="web"
charset="utf8mb4"
;*/
;?>

View File

@ -2,7 +2,7 @@
$conffile=parse_ini_file("config.ini.php");
$dsn=$conffile["dialect"].':host='.$conffile["host"].';dbname='.$conffile["dbname"].';charset='.$conffile["charset"];
$dsn=$conffile["dialect"].':'.$conffile["dsn"];
$id=0;
if(!is_null($_GET["id"]) and is_numeric($_GET["id"])){