Skip to content

Commit

Permalink
Fix PHP error on missing data/
Browse files Browse the repository at this point in the history
  • Loading branch information
Xwilarg committed Jul 19, 2023
1 parent 12f84d2 commit eb755a2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion web/php/getInfoJson.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
<?php
echo(file_get_contents("../data/info.json"));
if (file_exists("../data/info.json"))
{
echo(file_get_contents("../data/info.json"));
}
else
{
echo("{}");
}

0 comments on commit eb755a2

Please sign in to comment.