I think you need to wrap your code in php ... ?>
. Try this file:
php phpinfo(); ?>
By default, the contents of a PHP file are HTML that is sent untouched out to the browser. The markers php
and ?>
mark the start and end of PHP code that is interpreted by PHP.
manpreet
Best Answer
2 years ago
I have a test.php file in the web server directory with
php phpinfo();
content. When I try to executephp test.php
at a shell then it executes correctly. But when I try to open the web page in a browser, it showsphp phpinfo();
. How can I troubleshoot Apache 2 and PHP 5 on my UNIX machine?