PHP is "Hypertext Preprocessor" and is a general open source scripting language. PHP is a scripting language executed on the server side. It is similar to C language and is a commonly used website programming language. PHP's unique syntax mixes C, Java, Perl, and PHP's own syntax. It is conducive to learning and widely used. It is mainly suitable for the field of web development.
PHP scripts are mainly used in the following three areas:
Server-side scripts. This is the most traditional and main target area of PHP. To carry out this work, you need the following three things: PHP parser (CGI or server module), web server and web browser. (Recommended learning: PHP programming from entry to proficiency)
You need to install and configure PHP when running the web server. Then, you can use a web browser to access the output of the PHP program, that is, Browse the server-side PHP page. If you're just experimenting with PHP programming, all of this can be run on your home computer. Please consult the Installation chapter for more information.Command line script. You can write a PHP script and don't need any server or browser to run it. This way, only the PHP parser is needed to execute.
This usage is ideal for daily running scripts that rely on cron (Unix or Linux environment) or Task Scheduler (Windows environment). These scripts can also be used to process simple text. See PHP's command line mode for more information.Write desktop applications. For desktop applications with graphical interfaces, PHP may not be the best language, but if the user is very proficient in PHP and wants to use some advanced features of PHP in client applications, they can use PHP- GTK to write these programs.
Using this method, you can also write cross-platform applications. PHP-GTK is an extension of PHP that is not included in the commonly distributed PHP packages. If you are interested in PHP-GTK, please visit its » website for more information. PHP can be used on all major operating systems, including Linux, various variants of Unix (including HP-UX, Solaris, and OpenBSD), Microsoft Windows, Mac OS X, RISC OS, etc. Today, PHP already supports most web servers, including Apache, Microsoft Internet Information Server (IIS), Personal Web Server (PWS), Netscape and iPlant server, Oreilly Website Pro Server, Caudium, Xitami, OmniHTTPd et al. For most servers, PHP provides a module; some PHP supports the CGI standard, allowing PHP to work as a CGI processor.To sum up, using PHP, you can freely choose the operating system and web server.
At the same time, you can also choose to use process-oriented, object-oriented, or a mixture of the two during development. Although PHP 4 does not support all OOP standards, many code repositories and large applications (including the PEAR library) are developed using only OOP code. PHP 5 makes up for this weakness of PHP 4 and introduces a complete object model.The above is the detailed content of Is php a scripting language?. For more information, please follow other related articles on the PHP Chinese website!