diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-03-17 12:33:32 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-03-17 12:33:32 +0100 |
commit | 6429cb3f90a23fd1aae0d2298c54e8a88d213bcf (patch) | |
tree | ec078a915c5bd04446a59893766a4cbdf0b652d7 /class | |
parent | 53a5f6b267b1deb8c5f10973c1a238ff74a33e5a (diff) | |
download | wcms-6429cb3f90a23fd1aae0d2298c54e8a88d213bcf.tar.gz wcms-6429cb3f90a23fd1aae0d2298c54e8a88d213bcf.zip |
Added app class and reorganisation of the folders
Diffstat (limited to 'class')
-rw-r--r-- | class/class.app.php | 30 | ||||
-rw-r--r-- | class/class.art.php (renamed from class/art.php) | 0 |
2 files changed, 30 insertions, 0 deletions
diff --git a/class/class.app.php b/class/class.app.php new file mode 100644 index 0000000..4078c17 --- /dev/null +++ b/class/class.app.php @@ -0,0 +1,30 @@ +<?php +class App +{ + protected $bdd; + + public function __construct($config) + { + $host = $config['host']; + $dbname = $config['dbname']; + $user = $config['user']; + $password = $config['password']; + try { + $this->bdd = new PDO('mysql:host=' . $host . ';dbname=' . $dbname . ';charset=utf8', $user, $password); + } catch (Exeption $e) { + die('Erreur : ' . $e->getMessage()); + } + } + + public function getBdd() + { + return $this->bdd; + } + + public function createfrombdd($id, $bdd) + { + + } + +} +?>
\ No newline at end of file diff --git a/class/art.php b/class/class.art.php index 6b126ea..6b126ea 100644 --- a/class/art.php +++ b/class/class.art.php |