I am trying to require_once() a file that is in a folder located in my root... I am requiring this file from a file that is in another sub-folder of my root.
-
Root
-
includes
- include_all.php
-
my
- question_history.php
-
This is my/question_history.php:
<?php require_once("./includes/include_all.php"); ?>
I am getting these errors:
Warning: require_once(./includes/include_all.php) [function.require-once]: failed to open stream: No such file or directory in /Applications/XAMPP/xamppfiles/htdocs/AnswerTree2/my/question_history.php on line 3
Fatal error: require_once() [function.require]: Failed opening required './includes/include_all.php' (include_path='.:/Applications/XAMPP/xamppfiles/lib/php:/Applications/XAMPP/xamppfiles/lib/php/pear') in /Applications/XAMPP/xamppfiles/htdocs/AnswerTree2/my/question_history.php on line 3
I am kinda new to keeping files in different folders as I used to just put everything in root folder. bad practice i know. but anyway hope this is enough detail.