Check if file was loaded directly


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. if (basename(__FILE__) == basename($_SERVER['PHP_SELF'])) header("HTTP/1.0 404 Not Found");

Report this snippet


Comments


You need to login to view comments.