diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-13 22:21:07 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-04-13 22:21:07 +1000 |
| commit | b8951025635edc3c291d39bbab9f248e8c3de720 (patch) | |
| tree | 1362e4efd96652d058ed1f4b4e56370aa43c64fc /inc/database.php | |
| parent | a9bdc6eeb7f6dfa462d0400c51ffd37f562a8be2 (diff) | |
block loading include files directly
Diffstat (limited to 'inc/database.php')
| -rw-r--r-- | inc/database.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/inc/database.php b/inc/database.php index 21fabe71..88ca1c0d 100644 --- a/inc/database.php +++ b/inc/database.php @@ -1,4 +1,9 @@ <?php + if($_SERVER['SCRIPT_FILENAME'] == str_replace('\\', '/', __FILE__)) { + // You cannot request this file directly. + header('Location: ../', true, 302); + exit; + } function sql_open() { global $pdo, $config; |
