Hi people! im new here and im having issues with the require_once
I have a file in modules/php/utils/cards.inc.php, just a constant with values something like this
<?php
// Suit
const CARD_SUITS = [];
?>
In modules/php/Game.php im triyng to "import" this file by doing
require_once("modules/php/utils/cards.inc.php"); before the class definition
Im receiving the error
Wrong formatted data from gameserver 1 (method: createGame): JSON_ERROR_SYNTAX <br />
<b>Warning</b>: require_once(modules/php/utils/cards.inc.php): Failed to open stream: No such file or directory in <b>/var/tournoi/release/games/truco/999999-9999/modules/php/Game.php</b> on line <b>24</b><br />
{"status":"0","exception":"feException","error":"Fatal error during truco setup: Namespaced game module could not be loaded: \\Bga\\Games\\truco\\Game: Failed opening required 'modules\/php\/utils\/cards.inc.php'
What im doing wrong?
Thanks a lot!
I have a file in modules/php/utils/cards.inc.php, just a constant with values something like this
<?php
// Suit
const CARD_SUITS = [];
?>
In modules/php/Game.php im triyng to "import" this file by doing
require_once("modules/php/utils/cards.inc.php"); before the class definition
Im receiving the error
Wrong formatted data from gameserver 1 (method: createGame): JSON_ERROR_SYNTAX <br />
<b>Warning</b>: require_once(modules/php/utils/cards.inc.php): Failed to open stream: No such file or directory in <b>/var/tournoi/release/games/truco/999999-9999/modules/php/Game.php</b> on line <b>24</b><br />
{"status":"0","exception":"feException","error":"Fatal error during truco setup: Namespaced game module could not be loaded: \\Bga\\Games\\truco\\Game: Failed opening required 'modules\/php\/utils\/cards.inc.php'
What im doing wrong?
Thanks a lot!