Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

peterk900 on "Prevent php scripts used in WP being run outside WP"

$
0
0

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 all articles
Browse latest Browse all 8245

Trending Articles