From 5f73af4fefdc737eb83fdd88217d0b5d8fd0d5de Mon Sep 17 00:00:00 2001 From: gnieark Date: Sat, 12 Dec 2015 11:20:33 +0100 Subject: [PATCH] . --- src/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/functions.php b/src/functions.php index 5956461..3d55215 100644 --- a/src/functions.php +++ b/src/functions.php @@ -215,10 +215,10 @@ function save_battle($game,$bot1,$bot2,$resultat){ } function get_unique_id(){ - $fp = fopen(__DIR__.'/countBattles.txt', 'c+'); + $fp = fopen(__DIR__.'/../countBattles.txt', 'c+'); flock($fp, LOCK_EX); - $count = (int)fread($fp, filesize(__DIR__.'/count.txt')); + $count = (int)fread($fp, filesize(__DIR__.'/../countBattles.txt')); ftruncate($fp, 0); fseek($fp, 0); fwrite($fp, $count + 1);