call - Running php script from another php script in different folder -
I have a web application that is running in the root directory. I have some apps in any other directory that I have to run and get results. Therefore, from /root/myscript.php I want to call script /app/index.php which gives some value. The problem is that there are some scripts in index.php that are in the / app folder. And because my work directory is in the / root directory, this script is not included.
Is there any other way by which I can run index.php script from myscript.php and enable all required files to index.php?
You can include a file from the root directory:
included Do ('../somefilein_parent.php');
Comments
Post a Comment