Prevent access to files outside a certain directory in PHP
- by James L
I've found out the hard way that my website can be hacked by passing a query string parameter that has many ../s to access files outside of the website directory, and then screw with the website.
Is there a way, perhaps through the php.ini, to not allow file includes outside of a certain root directory?