I want to be able to type into the command line, and have the following PHP script execute like so:
$ hello.php
Question is, where do I save my hello.php
file to run it like this. I see a lot of tutorials showing this way, but they do not mention where to save the actual file. If I save it on my desktop then it will run when I type in:
~/Desktop/hello.php
I want to be able to just type in the file name regardless of what directory I'm in and have it execute.
Do I have to setup an alias? Or can I just put it in a specific folder.
hello.php
<?php
echo 'Hello! This is a test';