本地 HTML 文件无法正常打开
Local HTML files not opening properly
我的本地 .HTML 文件有问题。
每次我尝试在任何浏览器和任何计算机上打开它时它都不起作用,它会正常打开一秒钟,然后我看到屏幕说找不到文件路径。如果我的垃圾邮件刷新速度足够快,我可以阅读第一行。
.HTML 文件已从 .war 文件中提取出来。
如果我将代码复制到一个新文件中并打开那个文件,它会很好地打开。
引起我注意的奇怪之处是文件本身在浏览器上的路径
直接从.war文件中提取出来的如下:
file:///C:/Users/username/Desktop/New%20folder/help/User_Guide.html?1userhelp.html
但是文件夹"User_guide.html"上没有文件
如果我在桌面目录下创建相同的文件,它打开时没有问题,所以问题不在于文件本身的内容。
有没有人知道可能导致此问题的原因?
根据 SunnyPatel 的建议
We aren't sure which OS you are using, and so case-sensitivity may play a part in this. If you're on Windows, you can try viewing the parent folder in the browser, and see if you can click on the file within the default index page and open it from there
首先进入“/index.html”打开文件效果很好。整个导航非常流畅,问题是我试图直接打开文件。
我的本地 .HTML 文件有问题。
每次我尝试在任何浏览器和任何计算机上打开它时它都不起作用,它会正常打开一秒钟,然后我看到屏幕说找不到文件路径。如果我的垃圾邮件刷新速度足够快,我可以阅读第一行。
.HTML 文件已从 .war 文件中提取出来。
如果我将代码复制到一个新文件中并打开那个文件,它会很好地打开。
引起我注意的奇怪之处是文件本身在浏览器上的路径
直接从.war文件中提取出来的如下:
file:///C:/Users/username/Desktop/New%20folder/help/User_Guide.html?1userhelp.html
但是文件夹"User_guide.html"上没有文件
如果我在桌面目录下创建相同的文件,它打开时没有问题,所以问题不在于文件本身的内容。
有没有人知道可能导致此问题的原因?
根据 SunnyPatel 的建议
We aren't sure which OS you are using, and so case-sensitivity may play a part in this. If you're on Windows, you can try viewing the parent folder in the browser, and see if you can click on the file within the default index page and open it from there
首先进入“/index.html”打开文件效果很好。整个导航非常流畅,问题是我试图直接打开文件。