Skip to content

Instantly share code, notes, and snippets.

@fu-sen
Last active June 2, 2021 04:14
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
phpinfo() with IBM Cloud Functions - This output will be the Plain Text version.
<?php
function main(array $args) : array
{
ob_start();
phpinfo();
$phpinfo = ob_get_contents();
ob_end_clean();
return [
"headers" => ['Content-Type' => 'text/plain'],
"body" => $phpinfo
];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment