PHP making a download counter without leaving the current page

前端 未结 4 1346
刺人心
刺人心 2020-12-11 11:31

I tried to create a download counter with PHP. The script, I have created, works, but when I click the download link, the script sends me to a blank page. Is it possible to

4条回答
  •  伪装坚强ぢ
    2020-12-11 11:53

    Try using php header redirect instead of JS or meta tag redirect:

    Also make sure there is nothing outputted before the header.

    http://www.php.net/manual/en/function.header.php

    Also for the link, if it is still not working try adding the target attr:

    download
    

提交回复
热议问题