Open a direct file on the hard drive from firefox (file:///)

前端 未结 6 2133
难免孤独
难免孤独 2020-11-29 12:43

I have a small php system i created for myself. This system contains a few .doc and .docx file documents. I want to be able to open them directly from the browser and not do

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-11-29 12:55

    Which syntax did you use? The correct syntax for e.g. c:/path/to/file.ext would have been file:///c:/path/to/file.ext. Edit: not relevant anymore as OP has edited his question to include the syntax.

    Note that this doesn't work at all if the file is stored at the server machine which in turn is a physically different machine than the client machine (where the webbrowser runs).

提交回复
热议问题