php 怎么替换问号
本文操作环境:windows7系统,php7.4版,Dell G3电脑。
php 怎么替换问号?
PHP 网址中用斜杠代替问号 如何编写?
比如,网址 example.com/index.php/1/2
实际为 example.com/index.php?a=1&b=2
解决办法:
用htaccess重写就可以了。
RewriteEngine On RewriteBase / RewriteRule ^example.com/index.php/(.*)/(.*)$ example.com/index.php?a=$1&b=$2
版权声明:
作者:后浪云
链接:https://www.idc.net/help/8104/
文章版权归作者所有,未经允许请勿转载。
THE END