mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-09-18 09:32:08 +00:00
Latest working copy. Added writing for tbl
This commit is contained in:
31
index.php
31
index.php
@@ -1,16 +1,12 @@
|
||||
<?php
|
||||
|
||||
ini_set('display_errors', 0);
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('log_errors', 1);
|
||||
|
||||
require_once 'vendor/autolaod.php';
|
||||
require_once "config.php";
|
||||
|
||||
|
||||
|
||||
require_once "./config.php";
|
||||
|
||||
//$path = $d2_dir."data\\global\\excel\\";
|
||||
$path = $d2_dir."data/global/excel/";
|
||||
$path = $d2_dir;
|
||||
|
||||
$post = $_POST;
|
||||
if (!empty($post['code'])) {
|
||||
@@ -25,11 +21,24 @@ if (!empty($post['code'])) {
|
||||
require_once 'uniqueitems.php';
|
||||
$fp = fopen($u, 'a+');
|
||||
|
||||
//echo "<pre>";
|
||||
//print_r($post);
|
||||
//echo "</pre>";
|
||||
echo "<pre>";
|
||||
print_r($post);
|
||||
|
||||
foreach ($post as $p){
|
||||
echo "$p\t";
|
||||
}
|
||||
|
||||
echo "</pre>";
|
||||
|
||||
if (!empty($_POST)) {
|
||||
fputcsv($fp, $post, "\t");
|
||||
|
||||
// write for .tbl
|
||||
$str = '"'.$post["index"].'" "'. $post["index"] .'"';
|
||||
|
||||
file_put_contents("UniqueItemsTblEntries.txt", $str, FILE_APPEND | LOCK_EX);
|
||||
}
|
||||
|
||||
if (!empty($_POST)) {fputcsv($fp, $post, "\t");}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user