Taurus
03-21-2003, 11:47 AM
I put the php code on html page in FrontPage 2000 as follows:
<?php
$file_url = "http://www.domain.abc/folder/file.pdf";
header("Content-Type: application/pdf");
header("Content-Disposition: inline; filename="file.pdf"");
header("Location: $file_url");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-
1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
</body>
</html>
When I place page on web server, I receive error message like:
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)
in /host/h/e/l/p/o/r/domain.abc.com/index.php on line 9
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)
in /host/h/e/l/p/o/r/domain.abc.com/index.php on line 10
and so on..
Where do need put the code in this case? Is the basic HTML code that FP begins a new web page unnecessary?
<?php
$file_url = "http://www.domain.abc/folder/file.pdf";
header("Content-Type: application/pdf");
header("Content-Disposition: inline; filename="file.pdf"");
header("Location: $file_url");
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-
1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
</body>
</html>
When I place page on web server, I receive error message like:
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)
in /host/h/e/l/p/o/r/domain.abc.com/index.php on line 9
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)
in /host/h/e/l/p/o/r/domain.abc.com/index.php on line 10
and so on..
Where do need put the code in this case? Is the basic HTML code that FP begins a new web page unnecessary?