The usual problem is: this function is disabled in PHP configuration, for safety purposes. If you use shared hosting and cannot control it, the usual solution is to do development on your local host where you can install everything.
We cannot solve your problem with "http://localhost/phpinfo.php" because you did not provide any information on what's in your file "phpinfo.php" and if this file even exists. I cannot be sure that you even installed PHP. All you need is to call
phpinfo
:
PHP: phpinfo - Manual[
^].
There is nothing which would possibly need any explanations.
—SA