• I have a custom page template which reveals php files for someone studying the page source. What code can I put at the start of this file to prevent someone trying to run the script outside WordPress ?

    For example in an Ajax script I have the line

    if ( empty( $_REQUEST['action'] ) )
    	die( '0' );

    Someone trying to run this code directly just see a 0.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Prevent php scripts used in WP being run outside WP’ is closed to new replies.