From a8d40a4ac2f73da9509bde6c8337c13042cc6992 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sat, 17 Mar 2018 19:55:22 +0100 Subject: transfert --- public/w/index.php | 58 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 47 insertions(+), 11 deletions(-) (limited to 'public/w') 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 '
';
+// print_r($art);
+// print_r($app);
+// echo '
'; + +// $app->add($art); + +// echo '

art count :' . $app->count() . '

'; +// echo '

article exist :' . $app->exist('articlet') . '

'; +// var_dump($app->exist('articlet')); + +// $app->get('articlet'); + +// echo '
';
+// print_r($art);
+// print_r($app);
+// echo '
'; + +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(); -- cgit v1.2.3