Hi Expert,
Please help. Please look at the code below for 'include.php', which is included in every php file of my application
//Include.php
Actually when I uncomment the 'echo' statement i am getting " header cannot be modified error....', and when I comment it things are working fine.
I hope the page in which it is included also tries to send something in header, but since 'echo' statement has already sent the header, I am getting this error.
My problem is, I want to open all those pages in which include.php is included, in a frameset and not as individual pages.
Please let me know how can I implement this.
Note: I can't touch the files in which it is included but only this file for certain reasons.
Thanks
Please help. Please look at the code below for 'include.php', which is included in every php file of my application
//Include.php
Code:
<?php
session_start();
if(!session_is_registered("SESSION")){
$home_url = 'http://'. $_SERVER['HTTP_HOST'].'/admin_dev/authentication/login.php';
header('Location: ' . $home_url);
exit();
}
else
$timeout_url = 'http://'.$_SERVER['HTTP_HOST'].'/admin_dev/authentication/timeout.php';
header( "refresh: 120; url=$timeout_url");
$home_url2= 'http://'. $_SERVER['HTTP_HOST'].'/admin_dev/authentication/frame.php';
//echo "<script>if (parent.frames.length<1) location.replace($home_url2)</script>";
?>
I hope the page in which it is included also tries to send something in header, but since 'echo' statement has already sent the header, I am getting this error.
My problem is, I want to open all those pages in which include.php is included, in a frameset and not as individual pages.
Please let me know how can I implement this.
Note: I can't touch the files in which it is included but only this file for certain reasons.
Thanks
Comment