.
This commit is contained in:
parent
2754cd17ee
commit
5f73af4fef
|
@ -215,10 +215,10 @@ function save_battle($game,$bot1,$bot2,$resultat){
|
||||||
}
|
}
|
||||||
function get_unique_id(){
|
function get_unique_id(){
|
||||||
|
|
||||||
$fp = fopen(__DIR__.'/countBattles.txt', 'c+');
|
$fp = fopen(__DIR__.'/../countBattles.txt', 'c+');
|
||||||
flock($fp, LOCK_EX);
|
flock($fp, LOCK_EX);
|
||||||
|
|
||||||
$count = (int)fread($fp, filesize(__DIR__.'/count.txt'));
|
$count = (int)fread($fp, filesize(__DIR__.'/../countBattles.txt'));
|
||||||
ftruncate($fp, 0);
|
ftruncate($fp, 0);
|
||||||
fseek($fp, 0);
|
fseek($fp, 0);
|
||||||
fwrite($fp, $count + 1);
|
fwrite($fp, $count + 1);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user