Jump to content

[SOLVED] how to check if particular script is called from another script?


madrazel

Recommended Posts

set a variable in the main script and check to see if it is set in the include scripts, ie

 

 

main script

<?php
$var = abc";
include("file.php");
?>

 

include script

<?php
if($var !== "abc"){
  echo "hacking attempt";
  exit;
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.