在URL或路径点 [英] Dots in url or path

查看:235
本文介绍了在URL或路径点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑路径
    ./images/1.png

Consider the path ./images/1.png

下面./表示当前目录..
IE浏览器。在路单点是指当前目录。
similiarlly ../指其父目录.IE。两个点的路径指向一个目录回来。

Here ./ means current directory.. ie. single dot in path refer to current directory . similiarlly ../ refer to its parent directory .ie. two dots in path points to one directory back..

这么多回refernces怎样的路径是可能的。 ie.is'... /'。如果允许那么什么是它的意义? 。同时也意的'...... /。

也这是正确的'...... /或../../为当前目录的目录pparent的父目录..
请给我上的相对路径教程
假设我在服务器上的每个目录访问...

So how many back refernces are possible in a path. ie.is '.../' allowed .If so what is its meaning? . and also meaning of '..../'. ? Also which is correct '..../' or '../../' for the parent directory of the pparent directory of current directory.. Please give me a tutorial on relative paths Assume that i have access in every directory of the server...

推荐答案

把它看成是真正的文件夹,其中是到当前文件夹中的链接 .. 父之一。有没有其他人(只要你不创建它们,这是可能的,但不是真的有用),但也没必要为别人着想。如果你愿意,可以去两个目录,只是去了两个目录: ../ .. (等)

Think of it as "real folders", where . is a link to the current folder and .. to the parent one. There are no others (as long as you don't create them, which is possible, but not really usefull), but there is also no need for others. If you want to go up two directories, just go up two directory: ../.. (and so on).


  • CD MyFolder中更改工作目录到文件夹MyFolder文件

  • CD 更改工作目录到文件夹(这是目前的一个)

  • CD .. 更改工作目录到文件夹 .. (这是母公司的)

  • cd myfolder changes the work directory to the folder "myfolder"
  • cd . changes the work directory to the folder . (which is the current one)
  • cd .. changes the work directory to the folder .. (which is the parent one)

目前所有:没什么特别的:)只是用好奇的名称文件夹

At all: Nothing special :) Just folders with curious names

您甚至可以输入类似 ./././ ,只意味着真正有用的前pression当前目录下的当前目录当前目录。

You can even type something like ./././, which only means the really "useful" expression "the current directory of the current directory of the current directory".

这篇关于在URL或路径点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆