So in file first.php
I will include file original.php
with include_once
.
Problem occurs, when I try to call functions which are inside original.php
and that file is not loading if there is no user session.
Basicaly I'm include file original.php
in which are few functions im calling later in first.php
, but those functions are inaccesible due to restrictions I've set in original.php
, but now I want to add rule to original.php
to allow such requests from first.php
or any other PHP file that will include original.php
...
I wonder what could I do in this case OR could I simply add some if clause to original.php
, like:
if($fileIncluded == 'yes')
{
// do not check if user session exist etc.
}
else
{
// check for user session
}
Thanks for ideas and help in advance!