header is not working in iframe tag of html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<iframe src="blog3.php" frameborder="0" width="100%" height="600px" scrolling="yes" ></iframe>  
</body>
</html>

and at blog3.php there is a an header command

<? ob_start(); ?>
 header("Location: blogupf3.php"); 

<? ob_flush(); ?>

Recommended Answers

All 3 Replies

Member Avatar for diafol

The second file:

<?php
ob_start();
 header("Location: blogupf3.php"); 
ob_flush(); 
?>

no it not working

Member Avatar for diafol

Take off the obs. I assume you have apache or iis on. The code worked for me (without obs).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.