Dedix
July 4th, 2001, 18:59
i have a problem with the following code at barrysworld.com:
header("Content-disposition: filename=xy.txt");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");
$file_attachment = $rel_path.'text/xy.txt';
$attachment = fread($fp = fopen($file_attachment, 'r'), filesize($file_attachment));
fclose($fp);
while(preg_match('/(%.+%)/U',$attachment, $matches) == TRUE){
$matchvar = str_replace('%','',$matches[1]);
$attachment = str_replace($matches[1], $$matchvar, $attachment);
}
print $attachment;
this file, called download.php gets xy.txt inserted the required data (e.g. download.php?id=123456), but it downloads a file called download without any extension, the content is ok...
but on my computer, and other servers works fine, just on barrysword have problem with it
any idea?
thanks in advance
header("Content-disposition: filename=xy.txt");
header("Content-type: application/octetstream");
header("Pragma: no-cache");
header("Expires: 0");
$file_attachment = $rel_path.'text/xy.txt';
$attachment = fread($fp = fopen($file_attachment, 'r'), filesize($file_attachment));
fclose($fp);
while(preg_match('/(%.+%)/U',$attachment, $matches) == TRUE){
$matchvar = str_replace('%','',$matches[1]);
$attachment = str_replace($matches[1], $$matchvar, $attachment);
}
print $attachment;
this file, called download.php gets xy.txt inserted the required data (e.g. download.php?id=123456), but it downloads a file called download without any extension, the content is ok...
but on my computer, and other servers works fine, just on barrysword have problem with it
any idea?
thanks in advance