From 9740b868aa482580388a08956dd4db16e1673f61 Mon Sep 17 00:00:00 2001
From: root
Date: Tue, 25 Feb 2014 18:58:38 +0100
Subject: nothing
---
www/insertfile.php | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/www/insertfile.php b/www/insertfile.php
index cfc52a7..a8b000c 100644
--- a/www/insertfile.php
+++ b/www/insertfile.php
@@ -3,8 +3,17 @@
$en_dic = "../blob/en_GB.dic";
$test = "../blob/test";
-if($file = file($en_dic)){
- echo "Inserted file";
-} else {
+//if($file = file($en_dic)){
+$file = file($test);
+ echo "Inserted file
";
+ echo count($file);
+ echo "
" . $file . "
";
+
+ for($i=0;$i";
+
if(!$db->exec("
BEGIN TRANSACTION;
- INSERT INTO " . $table " VALUES (NULL, " . $file[$i] . ");
+ INSERT INTO " . $table . " VALUES (NULL, \"" . $file[$i] . "\");
COMMIT;
")){
echo "Failure writing to the database at row" . $i ."!";
$bool = true;
break;
}
+
}
if(!$bool){
diff --git a/www/setup.php b/www/setup.php
index a4ab123..9158353 100644
--- a/www/setup.php
+++ b/www/setup.php
@@ -1,6 +1,7 @@
$db = new SQLite3("../database/dict.db");
+$bool = false;
foreach ($_GET as $name => $value) {
if(preg_match("/drop(ped)?/i",$name)){
--
cgit v1.2.3