url_rewrite - PHP怎样检测服务器是否支持重写

WBOY
Release: 2016-06-06 20:47:45
Original
1106 people have browsed it

PHP语言怎样检测服务器是否开启了URL重写模块

回复内容:

PHP语言怎样检测服务器是否开启了URL重写模块

这不是PHP要做的事情。任何webserv都支持,要看是否已经配置智能通过请求检测。

首先你自己定义一个重写比如 http://www.a.com/rewrite 且假设rewrite应该返回1
然后你在检测程序中访问你的这个url 得到正确结果就是rewrite生效,否则则rewrite可能有问题,
我看一些cms是这么做的,检测phpinfo的话,比较有限

url_rewrite - PHP怎样检测服务器是否支持重写

查看phpinfo();
搜索一下Loaded Modules,加载的模块
:)

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!