From 8da075290d85491306193e9e488e2d4d9de1b9b6 Mon Sep 17 00:00:00 2001 From: Florian SYLVAIN Date: Fri, 24 Sep 2021 11:34:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Moving=20the=20extract=20script?= =?UTF-8?q?=20inside=20index.php=20into=20his=20own=20script=20file.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ProjetProgWeb/index.php | 22 +--------------------- ProjetProgWeb/scripts/extract.php | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 21 deletions(-) create mode 100644 ProjetProgWeb/scripts/extract.php diff --git a/ProjetProgWeb/index.php b/ProjetProgWeb/index.php index 55c612e..f5e16bf 100644 --- a/ProjetProgWeb/index.php +++ b/ProjetProgWeb/index.php @@ -1,23 +1,3 @@ ---------------- " . $row . " -----------------

\n"; - if ($row > 1) { - for ($c = 0 ; $c < $num ; $c++) { - $new_these->insertField($data[$c], $c); - } - $dump = new dump($new_these); - $dump->sendThese(); - } $row++; - } - fclose($handle); -} +echo "Welcome"; \ No newline at end of file diff --git a/ProjetProgWeb/scripts/extract.php b/ProjetProgWeb/scripts/extract.php new file mode 100644 index 0000000..eb4b98d --- /dev/null +++ b/ProjetProgWeb/scripts/extract.php @@ -0,0 +1,23 @@ + 1) { + for ($c = 0 ; $c < $num ; $c++) { + $new_these->insertField($data[$c], $c); + } + $dump = new dump($new_these); + $dump->sendThese(); + } $row++; + } + fclose($handle); + echo "CSV file imported into DB."; +}