当函数apache_get_modules()不可用时,是否有可能在PHP中检测到mod_rewrite ?
apache_get_modules()
mod_rewrite
你可以分析phpinfo()的输出:
phpinfo()
ob_start(); phpinfo(INFO_MODULES); $contents = ob_get_contents(); ob_end_clean(); var_dump(strpos($contents, 'mod_rewrite') !== false);