php code in html page -problem

liunx

Guest
I put the php code on html page in FrontPage 2000 as follows: <br />
<br />
<?php <br />
$file_url = "http://www.domain.abc/folder/file.pdf"; <br />
header("Content-Type: application/pdf"); <br />
header("Content-Disposition: inline; filename="file.pdf""); <br />
header("Location: $file_url"); <br />
?> <br />
<br />
<html> <br />
<br />
<head> <br />
<meta http-equiv="Content-Type" content="text/html; charset=windows- <br />
1252"> <br />
<meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <br />
<meta name="ProgId" content="FrontPage.Editor.Document"> <br />
<title>New Page 1</title> <br />
</head> <br />
<br />
<body> <br />
<br />
</body> <br />
<br />
</html> <br />
<br />
When I place page on web server, I receive error message like: <br />
<br />
Warning: Cannot add header information - headers already sent by (output started at /host/h/e/l/p/o/r/domain.abc.com/index.php:7) <br />
in /host/h/e/l/p/o/r/domain.abc.com/index.php on line 9<br />
<br />
Warning: Cannot add header information - headers already sent by (output started at /host/h/e/l/p/o/r/domain.abc.com/index.php:7) <br />
in /host/h/e/l/p/o/r/domain.abc.com/index.php on line 10 <br />
<br />
and so on..<br />
<br />
<br />
Where do need put the code in this case? Is the basic HTML code that FP begins a new web page unnecessary?<!--content-->Seeing how you are doing a PHP redirect before any of the actual html content will be displayed, just remove all of it from your page... It should however be working. Are you sure there is no html before the PHP code?<!--content-->I remove all content from html window and paste the php code at the top. But now I get error:ERROR 404 PAGE NOT FOUND <br />
<br />
Taurus<!--content-->Does this exist?<br />
<br />
$file_url = "http://www.domain.abc/folder/file.pdf";<!--content-->This is sample, the <!-- m --><a class="postlink" href="http://www.domain.abc/folder/">http://www.domain.abc/folder/</a><!-- m --> exist normally, <br />
but <!-- m --><a class="postlink" href="http://www.domain.abc/folder/file.pdf">http://www.domain.abc/folder/file.pdf</a><!-- m --> - gives error:ERROR 404 PAGE NOT FOUND<!--content-->
 
Back
Top