Prevent direct access to a php include file
This is the way to prevent direct access to a php include file on web host.
place following code on top of the base file:
like there is a form.php and you need to include it on register.php (you need to write include('form.php') code on regidter.php file)
The Bas file is "register.php"
<?php define('MyConst', TRUE); ?>
and you need to place following php code on top of the includable file (form.php) :
<?php if(!defined('MyConst')) { die('Direct access not permitted'); } ?>
Thank you for offering such a nice content very very unique blog .one of the recommended blog. PHP Services
ReplyDeleteEcommerce Service Provider
Web Data Extraction Services
Digital Payment Platform