Add phpinfo page only accessible to admins
This commit is contained in:
parent
8f1f2c8366
commit
fb0a21c0a2
|
@ -192,6 +192,7 @@ function admin_content(App $a)
|
||||||
"logsview" => ["admin/viewlogs/", L10n::t("View Logs"), 'viewlogs']
|
"logsview" => ["admin/viewlogs/", L10n::t("View Logs"), 'viewlogs']
|
||||||
]],
|
]],
|
||||||
"diagnostics" => [ L10n::t("Diagnostics"), [
|
"diagnostics" => [ L10n::t("Diagnostics"), [
|
||||||
|
"phpinfo" => ['phpinfo/', L10n::t('PHP Info'), 'phpinfo'],
|
||||||
"probe" => ['probe/', L10n::t('probe address'), 'probe'],
|
"probe" => ['probe/', L10n::t('probe address'), 'probe'],
|
||||||
"webfinger" =>['webfinger/', L10n::t('check webfinger'), 'webfinger']
|
"webfinger" =>['webfinger/', L10n::t('check webfinger'), 'webfinger']
|
||||||
]]
|
]]
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @file mod/phpinfo.php
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once 'boot.php';
|
||||||
|
|
||||||
|
function phpinfo_content()
|
||||||
|
{
|
||||||
|
if (!is_site_admin()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
phpinfo();
|
||||||
|
killme();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user