Welcome to bytea
当前位置: Home 学习资料 网站制作 关于路径(path) 今天是...date...

登录bbs

用户名
密码

bytea统计

Members : 43193
Content : 333
Web Links : 69
关于路径(path) PDF Print E-mail
Sunday, 08 May 2005 09:50

做网站最基本也是最容易出错的地方就是路径了。很多人做了很久的网页还是搞不清楚路径的问题。所以我来介绍一下路径的问题。

There are two different kinds of path used in web publishing: absolute path and relative path.

路径有两种:绝对路径相对路径

1。绝对路径

绝对路径就是完整的网址。比如 http://www.zijie.net/images/logo.gif 这个比较明简单,就不多说了。

2。相对路径

相对路径就是相对于当前网址的网址。for example, "../" stands for the parent folder, and "/" refers to the root directory of the web server. 就是说 "../" 表示父目录,"/"表示根目录。看个例子吧:

Current file(当前文件): http://www.zijie.net/test/temp/test.htm
Current folder(当前文件夹): http://www.zijie.net/test/temp/
Root directory of the web server(根目录): http://www.zijie.net/
如果要访问reaserch.htm这个文件:
Absolute Path(绝对路径) Relative Path(相对路径)
http://www.zijie.net/test/temp/research.htm research.htm
http://www.zijie.net/info/programme.htm /info/programme.htm
http://www.zijie.net/test/haha/summer.html ../haha/summer.html
http://www.zijie.net/test/temp/image/logo.gif image/logo.gif

现在大家明白怎么写路径了吧~~

呵呵~~

 

Comments (0)Add Comment

Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security code
Write the displayed characters


busy
 

支持本站:


相关文章


Connect with me via QQ:38074 or e-mail:

©2006 bytea.net All Copyrights Reserved.

本站备案编号:保密^_^

RSS:  

开启背景音乐