Last active
June 2, 2021 04:14
-
-
Save fu-sen/a386ad88766fec440b4fe078f26f0c81 to your computer and use it in GitHub Desktop.
phpinfo() with IBM Cloud Functions - This output will be the Plain Text version.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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