Here is 5 best methods to prevent access to your php file directly . In this tutorial i will create 2 files , index.php and main.php . users will grant access to index.php file and we will prevent them from accessing other php files on the same folder Fir
The best way to prevent direct access to files is to place them outside of the web-server document root (usually, one level above). You can still include them, but there is no possibility of someone accessing them through an http request.
Deny access to all files in your include directory. If your PHP include files are located in a particular directory, you can tell your web server to deny all access to it. Apache. If you are using Apache, you can create a .htaccess file and place it in th
Post a Comment:
Showing 0 Comments: