Some months before i have written a code to avoid the direct access of files using php, but now i have modified the previous script since it has some set backs, Let us take one file named MYFILE.PHP as an example, all you have to do is just add the below code on the top of all the script.
< ?php
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'MYFILE.PHP' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
?>
Always remember to change the file name accordingly.I have given that area in BOLD and CAPS
Incoming search terms:
- wordpress avoid direct calls to file (4)
- wordpress avoid direct calls to this file (2)
- prevent direct access to wordpress file (2)
- php disable direct acces (2)
- avoid direct call php (2)
- wordpress prevent php direct access (2)
- prevent url direct access php (1)
- prevent video file using php (1)
- prevent php script from direct access (1)
- prevent directory access using PHP#sclient=psy-ab (1)
- preventing direct url acess by cookie in php (1)
- prevent direct url call with php (1)
- prevent direct url access to files using java (1)
- prevent direct page access login php cookies (1)
- prevent direct page access cookies login php (1)
- prevent direct image access wordpress (1)
- prevent direct access to php script (1)
- prevent direct access to php files in wordpress (1)
- prevent direct access to file in java (1)
- prevent direct access to a web page by php (1)
- protect wordpress file from direct access (1)
- secure video file from direct access using php (1)
- wordpress prevent direct page access (1)
- wordpress prevent direct calls to php pages (1)
- wordpress prevent direct access to php (1)
- wordpress prevent direct access plugin php (1)
- wordpress prevent direct access php (1)
- wordpress enable direct access (1)
- wordpress direct access (1)
- wordpress deny direct access to script (1)
- disable direct access to php file (1)
- wordpress avoid direct call php (1)
- wordpress avoid direct access file (1)
- stop direct script calls php (1)
- stop direct login by URL uing PHP (1)
- stop direct acess to ajax php file (1)
- simple way to prevent direct url access in php (1)
- prevent direct access by URL in php (1)
- prevent direc calling of captcha php (1)
- php block direct access script (1)
You will also be interested in ,
- How to get the IP address of the visitor with PHP?
- View edit and save text file database using php
- Display Tags in wordpress
- Simple Visitor Counter Using php
- Text Size Switching Using PHP
- Simple Example Of Database Connection Using PEAR In PHP
- Count distinct records or values and display it using mysql and php
- Add rounded edge or corner images using php
- Simple php watermark script
- Database Connection And Pagination In PHP Using Symfony Framework

I’m happy! It is simple to see that you are passionate about your writing. Looking forward to future posts. Thanks!