What can PHP do? _php Tutorials

Source: Internet
Author: User
Tags gtk ibm db2
PHP can do anything. PHP is primarily used for server-side scripting, so you can use PHP to do the work that any other CGI program can do, such as collecting form data, generating dynamic Web pages, or sending/receiving Cookies. But PHP's capabilities are far from the limit.

PHP scripts are mainly used in the following three areas:

    • Server-side scripting. This is the most traditional and most important target area of PHP. This work requires the following three points: PHP parser (CGI or server module), Web server, and Web browser. You need to install and configure PHP when you run the Web server, and then you can use a Web browser to access the PHP program's output, which is to browse the PHP page on the service side. If you just experiment with PHP programming, all of this can be run in your own home computer. Please refer to the installation chapter for more information.
    • command-line scripting. You can write a PHP script and do not need any server or browser to run it. In this way, only the PHP parser is required to execute. This usage is ideal for scripts that rely on cron (Unix or Linux environments) or Task Scheduler (Windows environments) to run on a daily basis. These scripts can also be used to handle simple text. See the command-line mode for PHP for more information.
    • Writing desktop applications. PHP may not be the best language for desktop applications with graphical interfaces, but if the user is very proficient in PHP and wants to use some of the advanced features of PHP in the client application, you can use PHP-GTK to write these programs. In this way, you can also write cross-platform applications. PHP-GTK is an extension of PHP that is not included in the normally published PHP package. If you are interested in PHP-GTK, please visit their» website for more information.

PHP can be used on all major operating systems, including various variants of Linux, Unix (including HP-UX, Solaris, and OpenBSD), Microsoft Windows, Mac os X, RISC OS, and more. Today, PHP has supported 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, and more. For most servers, PHP provides a module, and some PHP supports the CGI standard, allowing PHP to work as a CGI processor.

In summary, using PHP, you are free to choose the operating system and Web server. At the same time, you can also choose to use the face process and face the object, or the mixture of the two in the development. Although PHP 4 does not support all of OOP's standards, many code warehouses and large-scale applications (including the PEAR Library) are developed using only OOP code. PHP 5 makes up the weakness of PHP 4 by introducing a complete object model.

Using PHP is not limited to outputting HTML. PHP can also be used to dynamically output images, PDF files, and even Flash animations (using libswf and Ming). It is also very easy to output text, such as XHTML and any other form of XML file. PHP can automatically generate these files, creating a cache of dynamic content on the server, either by printing them directly or by storing them in a file system.

One of the most powerful and notable features of PHP is that it supports a wide range of databases. Users will find it incredibly easy to write database-backed Web pages using PHP. 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 Abstraction extension library called PDO that allows you to freely use any database supported by the extension library. In addition, PHP supports ODBC, open database Connection Standard, which allows you to connect to any other database that supports the world standard.

PHP also supports services that utilize countless protocols such as LDAP, IMAP, SNMP, NNTP, POP3, HTTP, and COM (Windows environments). You can also open the original network port, allowing any other protocol to work together. WDDX complex data exchange between PHP support and all Web development languages. In connection with each other, PHP has supported the immediate connection to Java objects and can use them freely as PHP objects. You can even use our CORBA extension library to access remote objects.

PHP has an extremely efficient text processing feature that supports parsing from POSIX extensions or Perl regular expressions to XML documents. To parse and access XML documents, PHP 4 supports the SAX and DOM standards, or you can use the XSLT extension library to transform XML documents. PHP 5 standardizes All XML extensions based on robust libxm2 and adds SimpleXML and XMLReader support, extending its functionality in XML.

In addition, there are many other interesting extension libraries. For example Mnogosearch search engine functions, IRC gateway functions, various compression tools (gzip, bz2, zip), calendar conversion, translation ...

Since it is not possible to list all the features and conveniences of PHP here, please refer to the Installation and Function Reference section for more information on the extension libraries mentioned here.


http://www.bkjia.com/PHPjc/447019.html www.bkjia.com true http://www.bkjia.com/PHPjc/447019.html techarticle PHP can do anything. PHP is mainly used for server-side scripting, so you can use PHP to do any other CGI program can do the work, such as collecting form data, generating dynamic ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.