1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

open link with firefox in php

Discussion in 'PHP' started by guif, Feb 6, 2009.

  1. guif

    guif New Member

    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!
  2. shabbir

    shabbir Administrator Staff Member


    and not


    Try if it works
  3. guif

    guif New Member

    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.
  4. xpi0t0s

    xpi0t0s Mentor

    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.
  5. guif

    guif New Member

    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.

Share This Page