Page 1 of 1

Hyperlink to document

Posted: Fri Mar 24, 2006 1:13 am
by geeshan
How do I create a link to a doc file.

is the normal "include(file :///c:\aa.doc)" works.

is there any way to do this.

Geeshan

Posted: Fri Mar 24, 2006 2:10 am
by feyd
like any other link

Code: Select all

<a href="url">text</a>

Posted: Fri Mar 24, 2006 2:40 am
by geeshan
But the thing is I'm in a middle stage.

My first page has the link.
when it clicked I want to get the click event.
So I redirect it into another page and update database.
after updating the database how I redirect it to open the doc file.

Many thanks
Geeshan.

Posted: Fri Mar 24, 2006 2:58 am
by feyd
well, there's header('Location: ...') redirection and <meta http-equiv="..."> tag redirection. Both of which should be output, incase the user's agent doesn't support header redirection.

Posted: Fri Mar 24, 2006 3:11 am
by geeshan
Thanks

I checked the http://php.net/function.header .
It gave me a lot.

But the (Location : ...) concern with the "http:// ". isnt it.
Does it redirect to a word file if we use it like this?

header('Location : c:\aa.doc');

Rgds
Geeshan

Posted: Fri Mar 24, 2006 5:15 am
by s.dot
the document should be inside of your webservers document root

then

Code: Select all

header("Location: http://www.yourdomain.com/path/to/your/file.doc");