I am using the include function and it gives errors. This file was not found. In the root directory I have - index.php and config.php
index.php includes config.php and has some other data.
config.php contains database information and includes the /function.php function
There is a user of the folder and has the calculate.php file in calculate.php. I turned on the AJAX function, and the file is loaded into it by an AJAX call. The file is cal2.php and is located in the user folder . Now this cal2.php has an include function for config.php , for example:
include "../config.php";
When this cal2.php is loaded from calculate.php
Filefunction / function.php is not loaded. It shows that the file was not found for function function / function.php
So the file structure:
- root
- /index.php
- /config.php
- /user/calculate.php
- /user/cal2.php
- /function/function.php
How to proceed and not have a .php function enable error for cal2.php
source
share