zhuanzhou zhuanzhou - 10 months ago 22
Linux Question

Run PHP in Linux Command Line

I wrote a test file named

which path in CentOS is
. There is no browser, is there a way to run the file and see the output?



 - php /var/www/html/phpinfo.php
 - curl http://localhost/phpinfo.php

The first runs the script from commandline, the second fetches it from the webserver (this assumes you've configured it correctly)