Hi, i need some help with PHP...
as you know, PHP allows you to include files in a similar way as C's #include......
Well, i want to know a way to detect if a file is being included or if it is called directly in the browser...
Example:
I have 2 files: a.php and b.php . In b.php i have:
code:
include 'a.php';
and I want to write some code to produce an error when the user goes to http://my_server/a.php but that everything goes well when the page is loaded through b.php
Thanks