Jump to content

download other files in web browsing


Recommended Posts

hey all

how i could make my website to be able to download from it files that are different or not common like .txt

via web browsing

i get the file worng just 1.6k

i open it with notepad and saw same information of the http connection

thx in advanced

edit

moder pls move to Server - Side Help (IIS, Apache, etc.) sub-fourm

thx

Edited by aviv00
Link to comment
Share on other sites

  • 1 month later...

once your file is uploaded to the server you can set header like...

header("Content-type: application/force-download");

header("Content-Transfer-Encoding: Binary");

header("Content-length: ".filesize($file));

here $file is full path with file name.

thanx,

ravs

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...