関数 apache_mod_loaded()
定義ファイル :/blog/wp-includes/functions.php 17
apache_mod_loaded()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | /** * Does the specified module exist in the Apache config? * * @since 2.5.0 * * @param string $mod The module, e.g. mod_rewrite. * @param bool $default Optional. The default return value if the module is not found. Default false. * @return bool Whether the specified module is loaded. */ function apache_mod_loaded($mod, $default = false) { global $is_apache; if ( !$is_apache ) return false; if ( function_exists( 'apache_get_modules' ) ) { $mods = apache_get_modules(); if ( in_array($mod, $mods) ) return true; } elseif ( function_exists( 'phpinfo' ) && false === strpos( ini_get( 'disable_functions' ), 'phpinfo' ) ) { ob_start(); phpinfo(8); $phpinfo = ob_get_clean(); if ( false !== strpos($phpinfo, $mod) ) return true; } return $default; } |