The main fields of PHP scripts apart of course from being focused on server-side scripting, so you can do anything that another CGI program can do, such as collecting data from forms, generating pages with dynamic content, or submitting and receive cookies. Although PHP can do much more.

The main fields where PHP scripts are used

▸Server-side scripts

This is the most traditional field and the main focus. Three things are necessary for this to work: the PHP parser (CGI module or server), a web server, and a web browser. You need to run the server with a connected PHP installation. The result of the PHP program can be accessed with a browser, viewing the PHP page through the server. All of this can be run on your machine if you are experienced with PHP programming. See the section on installation instructions for more information.

▸Scripts from the command line

You can create a PHP script and run it without the need for a server or browser. You only need the PHP parser to use it in this way. This type of usage is ideal for scripts that are run regularly using cron (on * nix or Linux) or the Task Scheduler (on Windows). These scripts can also be used for simple word processing tasks. See the section Using PHP on the command line for more information.

▸Write desktop applications

PHP is probably not the most appropriate language for creating desktop applications with a graphical user interface, but if you know PHP well, and you would like to use some advanced features of PHP in client-side applications, you can use PHP-GTK to write such programs. It is also possible in this way to write platform-independent applications. PHP-GTK is a PHP extension, not available in the main distribution. If you are interested in PHP-GTK, you can visit your own »website.


Un comentario en «In which fields are PHP scripts mainly used?»

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *