0
我有一个问题。我正在php中创建一个应用程序,下面的代码.htacces所有链接工作正常。.htaccess帮助需要重写
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /courier/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /courier/index.php?view=$1 [L]
</IfModule>
现在我的链接都喜欢
http://localhost/courier/order-search/
但我有几个字段搜索表单,方法是GET,所以该链接是像下面这样
http://localhost/courier/order-search/?test=a&test1=b
所以,我的问题是我如何使用GET获取test和test1字段的值?
在此先感谢。
在你的PHP代码只是做'$ _GET [ '测试']和$ _GET [ 'test1的']' – anubhava
我试过,但没有工作.. –
在'你'index.php'命令 - 搜索/?test = a&test1 = b'作为'$ _GET ['view']'。你检查了吗?为什么不转储'phpinfo(INFO_VARIABLES);'? –