Skip to content

Instantly share code, notes, and snippets.

@varemenos
Created April 8, 2012 00:11
Show Gist options
  • Save varemenos/2333061 to your computer and use it in GitHub Desktop.
Save varemenos/2333061 to your computer and use it in GitHub Desktop.
PHP - Deny Direct Access
<?php
// inside included file
defined('INCLUDE') or die('No direct access allowed.');
?>
<?php
// inside includer
define('INCLUDE', true);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment