[vox-tech] Alternative to PHP Scripting

Bill Kendrick nbs at sonic.net
Wed Jul 13 17:04:36 PDT 2011


On Tue, Jul 12, 2011 at 11:40:08AM -0700, Rick Moen wrote:
> Quoting Gandalf Parker (gandalf at community.net):
> 
> > But I am going to save it. If all a person knows is PHP I can see where it 
> > might be the shortest route.
> 
> The PHP interpreter can also be used locally (e.g., via phpsh) without
> involving a Web server at all.

Or just 'php' (not 'phpsh', which is an interactive shell for PHP).

e.g.:

  $ php somescript.php


or even just put a shebang in at the top of the PHP file, and set it exec,
e.g.:

  $ cat > junk.php
  #!/usr/bin/php
  <?php
  echo "Hello world\n";
  ?>
  [Ctrl+D]
  $ chmod 700 junk.php
  $ ./junk.php
  Hello world
  $


-bill!


More information about the vox-tech mailing list