From 03c73e8cf811249793a5cfbe7bc91d0b990c371a Mon Sep 17 00:00:00 2001 From: Hash Borgir Date: Mon, 22 Mar 2021 06:17:02 -0600 Subject: [PATCH] Finally working on windows --- src/saveFile.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/saveFile.php b/src/saveFile.php index 3c80e74..197ce8f 100644 --- a/src/saveFile.php +++ b/src/saveFile.php @@ -68,11 +68,10 @@ class saveFile { if (!is_dir($this->path."tblEntries")) mkdir($this->path."tblEntries", 0700); // write for .tbl - $str[0] = $post['index']; - $str[1] = $post['index']; - $fp = fopen($this->path.DIRECTORY_SEPARATOR.'tblEntries'. DIRECTORY_SEPARATOR. "UniqueItemsTblEntries.txt", 'a+'); - fputcsv($fp, $str, "\t"); - } + $str = '"'.$post['index'].'"'."\t".'"'.$post['index'].'"'.PHP_EOL; + $file = $this->path."\\tblEntries\\UniqueItemsTblEntries.txt"; + file_put_contents($file, $str, FILE_APPEND); + } public function __construct() { $this->path = TXT_PATH;