Home >Backend Development >PHP Tutorial >What should I do if this program file always appears in the domain name when using paging?

What should I do if this program file always appears in the domain name when using paging?

WBOY
WBOYOriginal
2016-09-13 09:00:181123browse

Because there is $_SERVER["SCRIPT_NAME"], what should I do if this program file name always appears in the domain name when using paging? www.abc.com/123.php?page=1&num=2 I don’t want 123.php to appear. What should I do? Is it possible to use url rewriting in IIS? But I have never used url rewriting. Is there any other way?

<code>echo '<li>|<a href="'.$_SERVER["SCRIPT_NAME"].'?page='.$pagenum.'&num='.$num.'">尾页</a></li>';</code>

Reply content:

Because there is $_SERVER["SCRIPT_NAME"], what should I do if this program file name always appears in the domain name when using paging? www.abc.com/123.php?page=1&num=2 I don’t want 123.php to appear. What should I do? Is it possible to use url rewriting in IIS? But I have never used url rewriting. Is there any other way?

<code>echo '<li>|<a href="'.$_SERVER["SCRIPT_NAME"].'?page='.$pagenum.'&num='.$num.'">尾页</a></li>';</code>

http://php.net/manual/en/rese...

See if what you want is HTTP_REFERER

Statement:
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