What can PHP do ?. PHP can do anything. PHP is mainly used for script programs on the server. Therefore, PHP can be used to complete the work that can be done by any other CGI program, such as collecting form data and generating dynamic PHP to do anything. PHP is mainly used for script programs on the server end. Therefore, PHP can be used to complete the work that can be done by any other CGI program, such as collecting form data, generating dynamic webpages, or sending/receiving Cookies. However, PHP functions are far from limited.
PHP scripts are mainly used in the following three fields:
- Server script. This is the most traditional and main target field of PHP. To do this, you must have the following three items: PHP parser (CGI or server module), web server, and web browser. You need to install and configure PHP when running the web server. then, you can use a web browser to access the PHP program output, that is, browse the PHP page of the server. If you only want to experiment with PHP programming, all these can run on your home computer. For more information, see the installation chapter.
- Command line script. You can write a PHP script without any servers or browsers. In this way, only the PHP parser is required. This method is ideal for scripts that depend on cron (Unix or Linux environment) or Task Scheduler (Windows environment) for daily running. These scripts can also be used to process simple text. For more information, see The PHP command line mode.
- Write a desktop application. For desktop applications with graphic interfaces, PHP may not be the best language, but if you are very proficient in PHP and want to use some advanced features of PHP in client applications, PHP-GTK can be used to write these programs. In this way, you can also compile cross-platform applications. The PHP-GTK is an extension of PHP and does not include it in a commonly published PHP package. If you are interested in PHP-GTK, visit its» website for more information.
PHP can be used on all mainstream operating systems, including Linux and Unix variants (including HP-UX, Solaris and OpenBSD), Microsoft Windows, Mac OS x, and hierarchical OS. Today, PHP supports most web servers, including Apache, Microsoft Internet Information Server (IIS), and Personal web Server (PWS), Netscape, iPlant server, Oreilly Website Pro Server, Caudium, Xitami, OmniHTTPd, etc. For most servers, PHP provides a module, and some PHP supports CGI standards so that PHP can work as a CGI processor.
To sum up, the operating system and web server can be freely selected using PHP. At the same time, you can also choose to use the process-oriented and object-oriented approaches during development, or a mixture of the two methods for development. Although PHP 4 does not support all OOP standards, many code repositories and large applications (including PEAR libraries) only use OOP code for development. PHP 5 makes up for this weakness of PHP 4 and introduces a complete object model.
PHP is not limited to HTML output. PHP can also be used to dynamically output images, PDF files, and even Flash animations (using libswf and Ming ). It can also easily output text, such as XHTML and any other form of XML files. PHP can automatically generate these files, open a dynamic content cache on the server, and print them directly or store them in the file system.
One of the most powerful and notable features of PHP is that it supports a wide range of databases. Users will find that using PHP to write web pages supported by databases is incredibly simple. Currently, PHP supports the following databases:
- Adabas D
- DBase
- Empress
- FilePro (read-only)
- Hyperwave
- IBM DB2
- Informix
- Ingres
- InterBase
- FrontBase
- MSQL
- Direct MS-SQL
- MySQL
- ODBC
- Oracle (OCI7 and OCI8)
- Ovrimos
- PostgreSQL
- SQLite
- Solid
- Sybase
- Velocis
- Unix dbm
There is also a database abstract extension library called PDO that allows you to freely use any database supported by the extension Library. In addition, PHP also supports ODBC, that is, Open Database Connection Standard (Open Database Connection Standard), so it can connect to any other Database that supports the world's Standard.
PHP also supports services that use countless protocols such as LDAP, IMAP, SNMP, NNTP, POP3, HTTP, and COM (Windows environment. You can also open the original network port so that any other protocols can work together. PHP supports WDDX complex data exchange with all web development languages. With regard to mutual connection, PHP already supports instant connection to Java objects and can freely use them as PHP Objects. You can even use our extended library of CORBA to access remote objects.
PHP has extremely effective text processing features and supports extensions from POSIX or Perl regular expressions to XML Document parsing. To parse and access XML documents, PHP 4 supports the SAX and DOM standards. you can also use the XSLT Extension Library to convert XML documents. PHP 5 standardizes all XML extensions based on the robust libxm2, adds SimpleXML and XMLReader support, and extends its XML functions.
There are also many other interesting extension libraries. For example, mnoGoSearch search engine functions, IRC gateway functions, multiple compression tools (gzip, bz2, zip), Calendar Conversion, translation ......
As it is not possible to list all the features and convenience of PHP, refer to the installation and function reference section for more information about the extension Library mentioned here.
Http://www.bkjia.com/PHPjc/447019.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/447019.htmlTechArticlePHP can do anything. PHP is mainly used for script programs on the server. Therefore, PHP can be used to complete the work that can be done by any other CGI programs, such as collecting form data and generating dynamic data...