How can I simply run a PHP script in the command line? Also is it possible to run it like it would be if the URL was typed in?
Ubuntu – Run PHP script from command line
command linePHP
command linePHP
How can I simply run a PHP script in the command line? Also is it possible to run it like it would be if the URL was typed in?
Best Answer
As long as you have php installed, you run a PHP file using
Or if your $PATH is set up properly to include /usr/bin, then simply
You can check if PHP is installed, by running