I have a php file which is placed two levels down from the website root folder, that uses a Component to generate some of the PHP code:
webroot
level_1_folder
level-2_folder
index.php
(Component included in index.php)
In the Component hooks.js, the page property docRootPath is being returned as:
../../../
It should be being returned as:
../../
Currently this is causing an error in my PHP code, as a ‘required’ PHP file which is in another folder at the root level isn’t being found, due to this path being incorrect.
Editing the published index.php file and substituting the corrected value:
../../
corrects the issue.
I checked the published code in an index.php file (that includes the same component) residing in a level_1_folder, this correctly returns docRootPath as:
../