quote:
Originally posted by Chris Boulton
quote:
Originally posted by hmaster
A friend (Zero1) has told me you need to create a session
I have no idea how to work it (im still figuring it out) if you wanna have a crack at it
http://php.net/session_start
Oh and he said example 1 should really do what you want to do
What kind of dodgy way is that? Why do something like that when it can be accomplised like this:
a.php
code:
<?php
if(!defined("IN_SCRIPT"))
{
die("You can't call this file directly");
}
... your code here
?>
b.php
code:
<?php
define("IN_SCRIPT", 1);
.. your code here
?>
Easy!
I tought on that, but i'd like not to modify the file where the include statment is. (also, because there are many files that include the "a.php" file, and those files may be changed by others than me
)
Thanks anyway, Chris.