Go4Expert

Go4Expert (http://www.go4expert.com/)
-   PHP (http://www.go4expert.com/forums/php/)
-   -   open link with firefox in php (http://www.go4expert.com/forums/link-firefox-php-t16100/)

guif 6Feb2009 16:56

open link with firefox in php
 
I have a row in mysql that the content is:

insert into Link (Id_Link,Link) values (1,'//server/folder/documentum.doc');

I would like to make a link and I put this:

<a href="file:///<?php echo $row['Link']; ?>" target="_blank" title="<?php echo $row['Link']; ?>">

the link as: file://///server/folder/documentum.doc That's right!

why i can't open the DOC file directly with my Firefox??
If I copy this direction and put into the toolbar the file is open!

shabbir 6Feb2009 19:07

Re: open link with firefox in php
 
file:///

and not

file://////

Try if it works

guif 9Feb2009 15:42

Re: open link with firefox in php
 
for a path in another server it's necesary put 5 "/" and 3 "/" for a local path.

If i put file://///server/folder/documentum.doc firefox open correctly, but the problem is the link.
I see the correct link but it doesn't open.

xpi0t0s 9Feb2009 16:56

Re: open link with firefox in php
 
If the link displays as file://///server/folder/documentum.doc then that must mean <?php echo $row['Link']; ?> prints file://///server/folder/documentum.doc, and since your href specifies file:///<?php echo $row['Link']; ?> then you'll be getting file:///file://///server/folder/documentum.doc.

So try not adding file:/// yourself, then it should work.

guif 9Feb2009 22:12

Re: open link with firefox in php
 
are you sure??? I think that the problem is Firefox.

In the taskbar of Firefox i see file://///server/folder/documentum.doc this is correct, no?
If I set left button and "open in another tab" the file is open!!!! But if I make a simple click (the right button) the document don't open.


All times are GMT +5.5. The time now is 13:39.