# php -f php-file.php
1) Fire up a text editor and create your file, eg:
#!/usr/bin/php // ^^ that line tells the command line that the file should be parsed by the php CLI interpreter echo "Hello terminal\n";
2) Give the script execute permissions:
# chmod +x script.php
3) Execute your script:
# ./script.php Hello terminal
This is all assuming you have the CLI version of PHP. FC installs this by default.
Reference:
great
ReplyDelete