I have a little problem. Here is my example:
file1.php :
<?php include("file2.php"); ?>
file2.php :
<?php header("Location: file1.php"); ?>
Because file2.php is included the redirection process will never end. But I still want the file2.php to redirect to file1.php and I also need to include file2.php in file1.php.
It may sound a bit complicated, but I think it can be solved.
Any help is appreciated.
Thanks in advance.
Best Regards,
Akos
Wrap the redirection statement in an if statement like this:
You can also detect include with something like this: