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

shell Scripting:
Not Just in Perl Anymore
Oct 30, 2002 @ 13:42:23

Everyone out there knows that PHP is a great web language - it makes prototyping websites and throwing together simple scripts a breeze, but not so many people know that PHP is good for other things as well. And, in the latest DevArticles piece, they talk about just that.

An Alternative to Perl: Shell Scripting With PHP shows you the power that PHP can have as shell scripts on your system - working with files, grabbing updates from other sites to update your own - just about anything you can think of that you use Perl for, you can use PHP to do as well. Granted, there are all of the libraries for Perl that PHP doesn't have, but just give it time, I'm sure there'll be something out there before you know it.

The article steps you through installing PHP for use as a CGI (Windows) and then how to use it to get information from the command line, and how to write the information it gets back to you. They even show you how to make it so that PHP scripts can be run just like programs (on a Windows system) by setting the alias to run it through the PHP.exe.

tagged:

Link:


Trending Topics: