Automatic installer.php lang files by installer_builder (20070726)
[moodle-linuxchix.git] / admin / phpinfo.php
blob5c2398b576fec3eb96c238aa8be0443c07e05820
1 <?PHP // $Id$
2 // phpinfo.php - shows phpinfo for the current server
4 require_once("../config.php");
5 require_once($CFG->libdir.'/adminlib.php');
7 admin_externalpage_setup('phpinfo');
9 admin_externalpage_print_header();
11 echo '<div class="phpinfo">';
13 ob_start();
14 phpinfo(INFO_GENERAL + INFO_CONFIGURATION + INFO_MODULES);
15 $html = ob_get_contents();
16 ob_end_clean();
18 /// Delete styles from output
19 $html = preg_replace('#(\n?<style[^>]*?>.*?</style[^>]*?>)|(\n?<style[^>]*?/>)#is', '', $html);
20 $html = preg_replace('#(\n?<head[^>]*?>.*?</head[^>]*?>)|(\n?<head[^>]*?/>)#is', '', $html);
21 /// Delete DOCTYPE from output
22 $html = preg_replace('/<!DOCTYPE html PUBLIC.*?>/is', '', $html);
23 /// Delete body and html tags
24 $html = preg_replace('/<html.*?>.*?<body.*?>/is', '', $html);
25 $html = preg_replace('/<\/body><\/html>/is', '', $html);
27 echo $html;
29 echo '</div>';
31 admin_externalpage_print_footer();