-
-
Save Narayon/90a9423aa04771dbcd24 to your computer and use it in GitHub Desktop.
PHP: prevent direct folder/file access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( ! defined('ABSPATH') ) { | |
header( 'Status: 403 Forbidden' ); | |
header( 'HTTP/1.1 403 Forbidden' ); | |
exit; | |
} | |
//OR | |
if ( ! defined('ABSPATH') ) { die('-1'); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment