if ( ! function_exists( 'wp' ) && ! empty( $_SERVER['SCRIPT_FILENAME'] ) && basename( __FILE__ ) == basename( $_SERVER['SCRIPT_FILENAME'] ) ) {
die ( 'You do not have sufficient permissions to access this page!' );
}
I find these lines of code in index.php of a theme in WordPress.
What is the logic behind these lines?
Basically Its a check if the index.php file is accessed directly and not by WordPress, if the first is the case then the scripts stops the execution , displays a message
And stops farther execution for the script.