So here is my problem:
I have an index.php in root directory in xampp's htdocs. The purpose of that is to login an user. After he loggs in, he is redirected to the game/index.php, where i have two includes:
<?php include('/game/components/language_declaration.php');
include('/game/components/currency/userdata_func.php');
?>
Here is the directory list:
index.php (which redirects to index below)
---/game/index.php (includes work)
---/game/units.php (the same includes dont work)
---/game/components/language_declaration.php
---/game/components/currency/userdata_func.php
There is a link in this index which points to units.php. And there are the same includes in units.php, except the fact that they dont work. This is the error that i get:
Warning: include(/game/components/language_declaration.php): failed to open stream: No such file or directory in E:\xampp\htdocs\game\units.php on line 7
Warning: include(): Failed opening '/game/components/language_declaration.php' for inclusion (include_path='.;\xampp\php\PEAR') in E:\xampp\htdocs\game\units.php on line 7
Warning: include(/game/components/currency/userdata_func.php): failed to open stream: No such file or directory in E:\xampp\htdocs\game\units.php on line 8
Warning: include(): Failed opening '/game/components/currency/userdata_func.php' for inclusion (include_path='.;\xampp\php\PEAR') in E:\xampp\htdocs\game\units.php on line 8
I have read about 20 posts about this problem, every single one advised to change the path, I have tried to add dots, slashes and so one, even defining the root directory. None worked. Could you help me please?
Your include statements should be like this:
---/game/index.php
---/game/units.php