Created
January 17, 2017 11:18
-
-
Save AndiSHFR/ab6e9577e66383bb78a863c25505393f to your computer and use it in GitHub Desktop.
Protection against direct script calling.
This file contains 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
<?php | |
// Protect agains direct calls from the web browser | |
if(1 == count(get_included_files())) { | |
http_response_code(404); | |
die( '<h1>404 Not Found</h1><p>The page that you have requested could not be found.</p>'); | |
} | |
// More library code here | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment