Changeset 3029 for trunk/wp-admin/admin-functions.php
- Timestamp:
- 11/10/2005 11:25:39 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r3000 r3029 976 976 } 977 977 978 function got_mod_rewrite() { 979 global $is_apache; 980 981 // take 3 educated guesses as to whether or not mod_rewrite is available 982 if ( !$is_apache ) 983 return false; 984 985 if ( function_exists('apache_get_modules') ) { 986 if ( !in_array('mod_rewrite', apache_get_modules()) ) 987 return false; 988 } 989 990 if ( function_exists('ob_get_clean') ) { 991 ob_start(); 992 phpinfo(INFO_MODULES); 993 $php_modules = ob_get_clean(); 994 if ( strpos($php_modules, 'mod_rewrite') === false) 995 return false; 996 } 997 998 return true; 999 } 1000 978 1001 function save_mod_rewrite_rules() { 979 1002 global $is_apache, $wp_rewrite; … … 986 1009 return; 987 1010 988 if (! $is_apache)1011 if (! got_mod_rewrite()) 989 1012 return; 990 1013
Note: See TracChangeset
for help on using the changeset viewer.