How to replace question mark in php

藏色散人
Release: 2023-03-14 10:50:01
Original
1715 people have browsed it

php替换问号的方法:1、打开相应的配置文件;2、用htaccess重写即可,代码如“RewriteRule ^example.com/index.php/(.*)/(.*)$ example.com/index.php?a...”。

How to replace question mark in 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
Copy after login

推荐学习:《PHP视频教程

The above is the detailed content of How to replace question mark in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!