Skip to content

Commit 4d00724

Browse files
committed
Added php info to system info page
1 parent 1ed537a commit 4d00724

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

admin/controller/tools/systeminfo.php

+11-9
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,17 @@ function index() {
8787
list($info) = Event::trigger(__CLASS__, __FUNCTION__, $info);
8888

8989
$this->view->info = $info;
90-
/*
91-
ob_start();
92-
phpinfo();
93-
$php = ob_get_contents();
94-
ob_end_clean();
95-
$php = preg_replace('@^.+?<body><div class="center">|</div></body></html>@ms', '', $php);
96-
$php = preg_replace('@<table>@ms', '<table class="table table-bordered">', $php);
97-
$php = preg_replace('@<h2><a.+?>(.+?)</a></h2>@ms', '<h3>\1</h3>', $php);
90+
91+
if (isset($this->request->get['phpinfo'])) {
92+
ob_start();
93+
phpinfo();
94+
$php = ob_get_contents();
95+
ob_end_clean();
96+
$php = preg_replace('@^.+?<body><div class="center">|</div></body></html>@ms', '', $php);
97+
$php = preg_replace('@<table>@ms', '<table class="table table-bordered">', $php);
98+
$php = preg_replace('@<h2><a.+?>(.+?)</a></h2>@ms', '<h3>\1</h3>', $php);
9899

99-
$this->view->phpinfo = $php;*/
100+
$this->view->phpinfo = $php;
101+
}
100102
}
101103
}

0 commit comments

Comments
 (0)