note 69775 added to security
| From: | steffen at morkland dot com | Date: | Wed, 20 Sep 2006 13:38:26 +0000 |
| Subject: | note 69775 added to security | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-117347@lists.php.net to get a copy of this message | ||
In Reply to djjokla and others
Consider placing all incude files as mentioned before in a seperate folder containing a .htaccess
containing a Order Deny,Allow
the create a index file, which is intended to handle ALL request made to you php application, then
call it with index.php?view=index
the index file could look a bit like this:
<?php
switch($_GET['view']){
case 'index':
include('libs/index.php');
break;
default:
include('libs/404.php');
break;
}
?>
this could be an array or something even more creative. it actually does'nt matter how you do
it... running all pages through one central script has one big advantage.... CONTROL.
at any givin time, you can easily implement access control to functions without forgetting crucial
files.
----
Server IP: 194.239.128.3
Probable Submitter: 80.198.16.23
----
Manual Page -- http://www.php.net/manual/en/security.php
Edit -- https://master.php.net/note/edit/69775
Del: integrated -- https://master.php.net/note/delete/69775/integrated
Del: useless -- https://master.php.net/note/delete/69775/useless
Del: bad code -- https://master.php.net/note/delete/69775/bad+code
Del: spam -- https://master.php.net/note/delete/69775/spam
Del: non-english -- https://master.php.net/note/delete/69775/non-english
Del: in docs -- https://master.php.net/note/delete/69775/in+docs
Del: other reasons-- https://master.php.net/note/delete/69775
Reject -- https://master.php.net/note/reject/69775
Search -- https://master.php.net/manage/user-notes.php