【发布时间】:2015-08-18 11:37:38
【问题描述】:
基本上,我需要 3 个 switch case 脚本来导航 HTML 页面,如下所示:
1st:<BR>
index.php?1<BR>
index.php?2<BR>
index.php?3...
第二个(这个带有子页面):
index.php?1&2
所以举个例子,以第二本为例:我有几本书要放到网上,index.php是主目录,那么index.php?1是目录中的第一本书,index .php?1&1 是第一本书和其中的第一章...
And the 3rd:<BR>
**index.php?book_id=1** or<BR>
**index.php?book_id=1&chapter_no=1**
这可以实现吗?
【问题讨论】:
-
当然。只需使用
$_GET['book_id']或$_GET['chapter_no']访问它。 -
寻找/尝试过什么?
-
怎么添加? O.o 是的,但没有任何帮助。
-
告诉我们,让我们来评判。到目前为止,我们需要知道您的路径。
-
这是我使用的基本 switch case 脚本...
<?php $phpself = $_SERVER['PHP_SELF']; switch($_GET[' ']) { case '': include(""); break; } ?>
标签: php switch-statement case