aboutsummaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/index.php25
-rw-r--r--public/w/index.php58
2 files changed, 72 insertions, 11 deletions
diff --git a/public/index.php b/public/index.php
index e69de29..90df7d7 100644
--- a/public/index.php
+++ b/public/index.php
@@ -0,0 +1,25 @@
+<html>
+<a href="/w/">w</a>
+</html>
+
+<?php
+
+var_dump(__FILE__);
+
+$htdocs = str_replace(basename(__FILE__), __FILE__, '');
+
+var_dump($htdocs);
+
+var_dump($_SERVER["DOCUMENT_ROOT"]);
+
+
+set_include_path('e:/WEB/wcms');
+
+echo get_include_path();
+
+
+
+include('fn/fn.php');
+
+
+?> \ No newline at end of file
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();