Forum Moderators: coopster
<?php
require($page);
?>
So when you click on the link in the menu (i.e?page=mypage.php), it is displayed where the above php code is located. My problem is how do I secure the above PHP include so that it's safe from remote file inclusion attacks and things of that nature?
Thanks for the help!
Ok, got a script that will work. It uses GET, and doesn't use any variables like $page. Thanks for your help.
[edited by: Afterlithe at 11:04 pm (utc) on Mar. 30, 2007]
Wouldn't that give you a forbidden error when you try and access your content page that is stored in denied folder?
This means that you scripts can access the protected php code, but a visitor can't use your web server to access it (he will get a 403). There is no need to add protection code to your lib.