Superwormy
Golden Member
Is there a way to restrict the PHP include() and require() functions to a certain directory, or deny them access to a certain directory?
For instance, if I give the end-user any amount of control over what file gets included, theres a possibility that they could try to fudge with forms to include a file like:
../../my.cnf or ../../../boot.ini
Which could obviously give away some interesting information about a Windows machine and that MySQL database. Is there a way to not allowed the user to include any file underneath a certain directory level? Or to restrict them to a certain directory for includes or...?
For instance, if I give the end-user any amount of control over what file gets included, theres a possibility that they could try to fudge with forms to include a file like:
../../my.cnf or ../../../boot.ini
Which could obviously give away some interesting information about a Windows machine and that MySQL database. Is there a way to not allowed the user to include any file underneath a certain directory level? Or to restrict them to a certain directory for includes or...?