搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

href="file://f://myfile.ext would like to not specify hard drive and use same directory as my html file.

  • 2 个回答
  • 12 人有此问题
  • 20 次查看
  • 最后回复者为 hospital

more options

When using href="file://f://myfile.ext" it open fine within Firefox 3.6.8. However, I would like to NOT hard code the hard drive and use the same drive location as my html file that invokes this href link. I have tried to use href="file://///myfile.ext" and it does not work. I get an error message saying File Not Found. For ie browser I can just specify href="/myfile.ext" and it works fine. This is a simple html file that references severals local files and I have all of this material on a usb memory stick (ie my F drive). The memory stick will be sent to several folks and their usb drive may be some other letter.

When using href="file://f://myfile.ext" it open fine within Firefox 3.6.8. However, I would like to NOT hard code the hard drive and use the same drive location as my html file that invokes this href link. I have tried to use href="file://///myfile.ext" and it does not work. I get an error message saying File Not Found. For ie browser I can just specify href="/myfile.ext" and it works fine. This is a simple html file that references severals local files and I have all of this material on a usb memory stick (ie my F drive). The memory stick will be sent to several folks and their usb drive may be some other letter.

被采纳的解决方案

I found a solution to my problem. Found that I could just specify href="myfile.ext" and it will find it when it is in the same directory as the html containing the reference. No need for additional slashes!

定位到答案原位置 👍 0

所有回复 (2)

more options

选择的解决方案

I found a solution to my problem. Found that I could just specify href="myfile.ext" and it will find it when it is in the same directory as the html containing the reference. No need for additional slashes!

more options

i still have the issue that i can't link to a local drive on my private server. for example: file://q:\cheese\cheeseburger.avi

only openeds a blak page and putting my intranet adress in front of the above command. Thats way de cheesburger file won't start. The directory is not the same anymore. now it's called : http://intranet/ file://q:\cheese\cheeseburger.avi

Firefox weet niet hoe het dit adres moet openen, omdat het protocol (q) met geen enkel programma is verbonden.