Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint:
PHP on the Command Line (Pt. 2)
Aug 11, 2004 @ 12:10:45

New on SitePoint today, there's a new posting from Harry Fuecks in a continuation of his "PHP on the Command Line" series - Part 2.

In Part 1 of this tutorial, we had a look at PHP's command line SAPI (server API). In this article, we'll take things a step further, and see how you can hook up a command line PHP script with existing command line tools provided by your operating system. In contrast to the last article, the focus of this article will be Unix-based systems -- something which can't be avoided.

He dives right in where he left off, walking through some of the command line options, then shows how to execute another PHP script inside your main one, as well as explaining the shell execution functions and how they are best used. From there, he moves into security issues, and the script's interaction with the world around it (external variables, process control, signal catching, etc).

tagged:

Link:


Trending Topics: