i tried to create a download script (download.php). The content of the script goes like:
<?php
$path="./myfiles";
$filename="computer.jpg"
header("Content-Disposition: attachment; filename=$filename"
header("Content-Transfer-Encoding: binary"
;
header("Content-Type: applicatin/octet-stream"
;
readfile("$path/$filename"
;
?>
the output:
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/mypage/download.php:2) in /usr/local/apache2/htdocs/mypage/download.php
These messages points at all the lines beginning the "header".
What does this error means? How do i go about it?
thanks,
<?php
$path="./myfiles";
$filename="computer.jpg"
header("Content-Disposition: attachment; filename=$filename"
header("Content-Transfer-Encoding: binary"
header("Content-Type: applicatin/octet-stream"
readfile("$path/$filename"
?>
the output:
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache2/htdocs/mypage/download.php:2) in /usr/local/apache2/htdocs/mypage/download.php
These messages points at all the lines beginning the "header".
What does this error means? How do i go about it?
thanks,