Posted By

cdohost on 09/28/11


Tagged

php redirect


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

guillermoj88gmailcom


PHP - Prevent direct access to php file


 / Published in: PHP
 

Prevent direct access to php file (Prevenir acesso direto ao arquivo php)

  1. if (stristr(htmlentities($_SERVER['PHP_SELF']), "config.php"))
  2. {
  3. Header("Location: ../index.php");
  4. die();
  5. }

Report this snippet  

You need to login to post a comment.