Skip to content

Instantly share code, notes, and snippets.

@jsbonso
Created May 23, 2020 21:39
Show Gist options
  • Save jsbonso/f7dbe74c08124c12ab921d2746041a71 to your computer and use it in GitHub Desktop.
Save jsbonso/f7dbe74c08124c12ab921d2746041a71 to your computer and use it in GitHub Desktop.
How to avoid your php file from being accessed directly
// Add this code to automatically
// exit if this php file is accessed directly
defined( 'ABSPATH' ) || exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment