Search found 3 matches

by pcman312
Sun Jan 18, 2009 9:02 am
Forum: PHP - Security
Topic: Detecting what file is including another file
Replies: 5
Views: 1056

Re: Detecting what file is including another file

Awesome. Thanks a lot. I did a print_r on $_SERVER to see what else I could extract from there on a given file. These all seem to give me the same information from both my includer and the included file: [SCRIPT_FILENAME] => /*****/public_html/temp/includer.php5 [REQUEST_URI] => /temp/includer.php5...
by pcman312
Sun Jan 18, 2009 12:05 am
Forum: PHP - Security
Topic: Detecting what file is including another file
Replies: 5
Views: 1056

Re: Detecting what file is including another file

Awesome. Thanks a lot. I did a print_r on $_SERVER to see what else I could extract from there on a given file. These all seem to give me the same information from both my includer and the included file: [SCRIPT_FILENAME] => /*****/public_html/temp/includer.php5 [REQUEST_URI] => /temp/includer.php5 ...
by pcman312
Sat Jan 17, 2009 2:22 am
Forum: PHP - Security
Topic: Detecting what file is including another file
Replies: 5
Views: 1056

Detecting what file is including another file

I've been pondering over how to enforce how/where/who includes a given PHP file and my question is: Is there a way for a PHP script to be able to detect what script is including it? In other words, if X.php is including Y.php, is there a way for Y.php to detect that it's being included by X.php? If ...