1

たとえば、ファイル内test.php

<a href="someting/?start=1">go</a>;

そのため、これtest.phpがディレクトリ内であろうとDocument_Root/Test/ディレクトリ内でDocument_Root/Production/あろうと、アンカーはそれ自体を指します。

4

1 に答える 1

10

クエリ文字列のみを変更するリンクを作成するには、次を使用します

<a href="?foo=bar">whatever</a>

つまり、 にいる場合は にhttp://the/current/url.php、 にいるhttp://the/current/url.php?foo=bar場合はhttp://somewhere/else?entire=lyに移動しhttp://somewhere/else?foo=barます。

于 2009-05-17T02:07:19.910 に答える