What can PHP do?
Anything. PHP is mainly focused on server-side scripting,
so you can do anything any other CGI program can do, such
as collect form data, generate dynamic page content, or
send and receive cookies. But PHP can do much more.
There are three main fields where PHP scripts are used.
Server-side scripting. This is the most traditional and
main target field for PHP. You need three things to make
this work. The PHP parser (CGI or server module), a webserver
and a web browser. You need to run the webserver, with a
connected PHP installation. You can access the PHP program
output with a web browser, viewing the PHP page through
the server. See the installation instructions section for
more information.
Command line scripting. You can make a PHP script to run
it without any server or browser. You only need the PHP
parser to use it this way. This type of usage is ideal for
scripts regularly executed using cron (on *nix or Linux)
or Task Scheduler (on Windows). These scripts can also be
used for simple text processing tasks. See the section about
Command line usage of PHP for more information.
Writing client-side GUI applications. PHP is probably not
the very best language to write windowing applications,
but if you know PHP very well, and would like to use some
advanced PHP features in your client-side applications you
can also use PHP-GTK to write such programs. You also have
the ability to write cross-platform applications this way.
PHP-GTK is an extension to PHP, not available in the main
distribution. If you are interested in PHP-GTK, visit its
own website.
|