开发者

relative v absolute path?

What would the relative path of the following url be?

http://domain.com/wp-content/themes/theme开发者_如何学JAVAname/images/breadcrumb_sep.png


Relative to the root of your domain? /wp-content/themes/themename/images/breadcrumb%5Fsep.png

Relative to the Themes folder? themename/images/breadcrumb%5Fsep.png

It depends on where you are actually placing the link. Pretty much just remove the common parts of the path.


/wp-content/themes/themename/images/breadcrumb%5Fsep.png

"relative" to the host.... I think that is what you mean, that is the common meaning.


Depends on where it's being called from hence the term relative, it's relative to where it's being called from.

If you're in a sub-folder of your root other than wp-content then the relative path would be

../wp-content/themes/themename/images/breadcrumb%F5sep.png


In the source html file could be relative to some path defined by base href, see:

<head>
<base href="http://domain.com/wp-content/themes/themename/images" />
</head>

then

<a href="breadcrumb%5Fsep.png">text</a>

Anyway, please be more precise with your question to get better answers :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜