2009-11-01 10:57:00 +00:00
|
|
|
<?php
|
2003-05-21 09:50:17 +00:00
|
|
|
// phpinfo.php - shows phpinfo for the current server
|
|
|
|
|
|
|
|
require_once("../config.php");
|
2006-09-15 08:59:02 +00:00
|
|
|
require_once($CFG->libdir.'/adminlib.php');
|
2003-05-21 09:50:17 +00:00
|
|
|
|
2007-04-30 17:08:34 +00:00
|
|
|
admin_externalpage_setup('phpinfo');
|
2005-11-15 18:21:22 +00:00
|
|
|
|
2010-03-31 08:05:53 +00:00
|
|
|
echo $OUTPUT->header();
|
2006-09-15 08:59:02 +00:00
|
|
|
|
2016-08-18 14:16:47 +08:00
|
|
|
echo '<div class="phpinfo text-ltr">';
|
2006-09-15 08:59:02 +00:00
|
|
|
|
|
|
|
ob_start();
|
2015-05-30 07:04:46 +02:00
|
|
|
phpinfo(INFO_GENERAL + INFO_CONFIGURATION + INFO_MODULES + INFO_VARIABLES);
|
2006-09-15 08:59:02 +00:00
|
|
|
$html = ob_get_contents();
|
|
|
|
ob_end_clean();
|
|
|
|
|
2007-01-13 20:11:31 +00:00
|
|
|
/// Delete styles from output
|
2006-09-15 08:59:02 +00:00
|
|
|
$html = preg_replace('#(\n?<style[^>]*?>.*?</style[^>]*?>)|(\n?<style[^>]*?/>)#is', '', $html);
|
|
|
|
$html = preg_replace('#(\n?<head[^>]*?>.*?</head[^>]*?>)|(\n?<head[^>]*?/>)#is', '', $html);
|
2007-01-13 20:11:31 +00:00
|
|
|
/// Delete DOCTYPE from output
|
|
|
|
$html = preg_replace('/<!DOCTYPE html PUBLIC.*?>/is', '', $html);
|
|
|
|
/// Delete body and html tags
|
|
|
|
$html = preg_replace('/<html.*?>.*?<body.*?>/is', '', $html);
|
|
|
|
$html = preg_replace('/<\/body><\/html>/is', '', $html);
|
2006-09-15 08:59:02 +00:00
|
|
|
|
|
|
|
echo $html;
|
|
|
|
|
|
|
|
echo '</div>';
|
|
|
|
|
2009-08-06 14:12:46 +00:00
|
|
|
echo $OUTPUT->footer();
|
2006-09-15 08:59:02 +00:00
|
|
|
|
2009-11-01 10:57:00 +00:00
|
|
|
|