w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Restrict direct access to .php files through browser and allow only index.php to access them

One common way in PHP is to define something in index.php and check for it in the others:

define('INDEX', true);
//more code

if(!defined('INDEX') { die(); }
//more code

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.