Home > Backend Development > PHP Tutorial > 链接地址重复有关问题。

链接地址重复有关问题。

WBOY
Release: 2016-06-13 10:23:06
Original
929 people have browsed it

链接地址重复问题。。求救!


问题:

网站本址地址:http://192.168.0.15/dircms

当进到某个内容页时(内容页地址 http://192.168.0.15/dircms/html/201205/content_17.htm)

内容页下 某篇文章的链接(如 href="html/201205/content_15.htm")这链接是正确的。html在根目录下的。

当我点击文章的标题时,进入的是:(http://192.168.0.15/dircms/html/201205/html/201205/content_16.htm)

地址的目录重复。两个(html/201205)也就是会加上当前目录,


不知道上面有没有表达清楚。

------解决方案--------------------
,用绝对路径……

这样很方便。。比如URL重写的情况,或者生成静态时候,目录是不定的,相对的CSS、js、图片路径等

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template