代码查看php是否已开启rewrite功能模块

通过php代码来查询,是否把rewrite模块打开了

<?php

$result = apache_get_modules();

if(in_array('mod_rewrite', $result)) {
echo 'Support';
} else {
echo 'Do not Support!';
}
?>
原文地址:https://www.cnblogs.com/tommy-huang/p/4105637.html