Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 从父文件夹中打开文件_Html_File_Hyperlink - Fatal编程技术网

Html 从父文件夹中打开文件

Html 从父文件夹中打开文件,html,file,hyperlink,Html,File,Hyperlink,是否可以从父文件夹打开文件 假设我有这个文件树 parent other file.pdf website index.html 我想用a标签从索引中打开file.pdf,我该怎么做?是否可能?使用“特殊指令”。遍历“上”一个目录级别: <a href="../other/file.pdf">file.pdf</a> 它可以重复多次以继续向上遍历文件夹层次结构。使用“特殊说明”。向上遍历目录级别: <a hre

是否可以从父文件夹打开文件

假设我有这个文件树

parent
    other
        file.pdf
    website
        index.html
我想用
a
标签从索引中打开file.pdf,我该怎么做?是否可能?

使用“特殊指令”
遍历“上”一个目录级别:

<a href="../other/file.pdf">file.pdf</a>

它可以重复多次以继续向上遍历文件夹层次结构。

使用“特殊说明”
向上遍历目录级别:

<a href="../other/file.pdf">file.pdf</a>


可以重复多次以继续向上遍历文件夹层次结构。

使用双点向上移动一级:

<a href="../other/file.pdf">file.pdf</a>

使用双点上升一级:

<a href="../other/file.pdf">file.pdf</a>

是的,您只需在href中给出完整路径即可

<a href="../other/file.pdf">link</a>

是的,您只需在href中给出完整路径即可

<a href="../other/file.pdf">link</a>


New里面有双重的东西。我好久没用了,里面有双重的东西。我已经很久没用过了。如果你只是想要一个下载文件的链接,只需在a标签中使用“./other/file.pdf”。但是,如果您正在寻找嵌入pdf文件,请在此处查阅:如果您只想获得下载该文件的链接,只需在a标记中使用“./other/file.pdf”。但是如果你想嵌入一个pdf文件,那么可以在这里查阅:新的,里面有双重的东西。我好久没用了,里面有双重的东西。我好久没用了,明白吗