mkdir mian
cd main
touch main.php

add below code to main.php

<!--?php include("./sub/sub.php");//whether or not require or include a file change can't change execute path echo "\n" echo realpath("./"); ?-->
mkdir sub;
touch sub.php

add below code to sub.php

<!--?php //chdir("/usr/local/bin");//chdir can change execute path echo realpath("./"); ?-->

conclusion :
execute path can’t changed whether or not is executed in require and include or main php file

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.