My question is that I have 1 script, example. main.php , and this script is including another file, example include.php .
This is included as follows:
Code: Select all
main.php
<?php
include ('http://www.example.com/include.php?somevar=1');
?>
include.php
<?php
echo basename($_SERVER['SCRIPT_NAME']);
?>Why is it that the include.php always shows "include.php", and never "main.php". How can I tell what script is including another from a script that is included via a url, it this possible, have you run into this problem, how did you correct it.
Any help is appreciated, Thank you