Jump to content

download count and download file in php


juneshi

Recommended Posts

HI sir,

  i have a download file, now, when i click download button, it will open a middle php page, this page contain download counts and download file,then return download file.

  download.php -> middle php file (---------)->download.php

my code in middle page:

<?php
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=aaa.exe");

header("Location: download.php");
?>

but, there's no effect in these download code, when i comment the last code, it can download it. how should i do it?
thanks. 
Link to comment
https://forums.phpfreaks.com/topic/23329-download-count-and-download-file-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.