Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can header direct user to open a file

Status
Not open for further replies.

jackps

Technical User
Jul 7, 2003
66
HK
Dear all
I'm building up my web page using php and mysql, so what i want to do is when user click on a link which contain no sub heading or sub title on it, then the HEADER function will direct open the destination file. here is my header script

header("Location: ////servername/sys/appraisal.pdf");

i tried this, but got a error saying :
The page cannot be found

i just wonder if header function can open a file for the user rather than just direct user to specific HTML page?

Thanks alot!

Jack
 
Dear Predamarcel
I had tried what you say, but it still can't open that file, i had also tried something like this :

header("location:file://///Server_name/sys/appraisal form.doc");

which stil the same saying "The page cannot be display"
and 'Cannot find server or DNS Error'

i'm sure the file is there and the path is right, cause i had copy the path "file://///Server_name/sys/appraisal form.doc" to the address bar in IE and it can open the file i want!

so is there anyway that header can open the file which located in my internal network server?

Thx alot

Jack
 
Dear Predamarcel
thanks for the quick reply, but the file is located on a different server rather than in the same server(Web server).
As you said why not putting the can you give me a simple example on it? as i'm not good on html script! and is it possible to open any file that is located in different server using http protocol?

thx alot

Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top