aboutsummaryrefslogtreecommitdiff
path: root/public/w
diff options
context:
space:
mode:
Diffstat (limited to 'public/w')
-rw-r--r--public/w/index.php58
1 files changed, 47 insertions, 11 deletions
diff --git a/public/w/index.php b/public/w/index.php
index 250a870..85c0902 100644
--- a/public/w/index.php
+++ b/public/w/index.php
@@ -2,24 +2,60 @@
//inw
-$root = $_SERVER["DOCUMENT_ROOT"];
-require($root . '/fn.php');
-require($root . '/class/art.php');
-$config = include($root . '/config.php');
-$domaine = $config['domaine'];
+set_include_path('e:/WEB/wcms');
+
+require('fn/fn.php');
+require('class/class.art.php');
+require('class/class.app.php');
+$config = include('config.php');
+$app = new App();
session();
// fin de in
-$app = new App($config);
-$art = new Art;
-$art->createfrombdd($id, $app->getBdd());
-include($root . '/head.php')
+head('article');
+
+
+// $art = new Art([
+// 'id' => 'prout',
+// 'titre' => 'Prout',
+// 'soustitre' => 'mega prout !',
+// 'intro' => 'bienvenue dans le mega prout',
+// 'datemodif' => new DateTimeImmutable(null, timezone_open("Europe/Paris"))
+// ]);
+
+// echo '<pre>';
+// print_r($art);
+// print_r($app);
+// echo '</pre>';
+
+// $app->add($art);
+
+// echo '<p>art count :' . $app->count() . '</p>';
+// echo '<p>article exist :' . $app->exist('articlet') . '</p>';
+// var_dump($app->exist('articlet'));
+
+// $app->get('articlet');
+
+// echo '<pre>';
+// print_r($art);
+// print_r($app);
+// echo '</pre>';
+
+try {
+ $bdd = new PDO('mysql:host=localhost;dbname=wcms;charset=utf8', 'root', '');
+} catch (Exeption $e) {
+ die('Erreur : ' . $e->getMessage());
+}
+
+$q = $bdd->query('SELECT * FROM art WHERE id = articlet');
+$donnees = $q->fetch();
+
+var_dump($donnees);
-rpout
-CURLOPT_PROXYAUT
+$q = closeCursor();