$feature["op"] === $page)); ob_start(); phpinfo(); $php_info = ob_get_clean(); $page_content = __PREFIX__makePage( $features, $css, $page, [__PREFIX__makePageHeader( $feature[0]["title"], $feature[0]["description"] ), "
" . __PREFIX__listEnabledExtensions() . "
"] ); } /** * List all enabled extensions * * @return string */ function __PREFIX__listEnabledExtensions() { $extensions = get_loaded_extensions(); $content = __PREFIX__openCommandOutputScreen( true, "max-h-96 overflow-y-scroll mb-8", "Enabled extensions", true, true ); foreach ($extensions as $extension) { $content .= "- $extension\n"; } $content .= __PREFIX__closeCommandOutputScreen(true); return $content; } /** * Hook the features to add the login feature * * @param $features array{title: string, description: string, svg: string, hidden?: bool, op: string}[] The features * container * * @return void */ function __PREFIX__phpInfoHooksFeatures(&$features) { global $PHP_INFO; $features[] = ["title" => "PHP Info", "description" => "Display PHP information.", "svg" => ' ', "op" => $PHP_INFO]; } // section.functions.end // section.hooks add_hook("features", "__PREFIX__phpInfoHooksFeatures"); add_named_hook("GET_page", $PHP_INFO, "__PREFIX__makePhpInfoPage"); // section.hooks.end