Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 8583

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>What can PHP do?</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="intro-whatis.html">What is PHP?</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="tutorial.html">A simple tutorial</a></div>
 <div class="up"><a href="introduction.html">Introduction</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="intro-whatcando" class="section">
   <div class="info"><h1 class="title">What can PHP do?</h1></div>
   <p class="para">
    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.
   </p>
   <p class="para">
    There are three main areas where PHP scripts are used.
    <ul class="itemizedlist">
     <li class="listitem">
      <span class="simpara">
       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 web server and a web browser. You need to
       run the web server, with a connected PHP installation.
       You can access the PHP program output with a web browser,
       viewing the PHP page through the server. All these can
       run on your home machine if you are just experimenting
       with PHP programming. See the
       <a href="install.html" class="link">installation instructions</a>
       section for more information.
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       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
       <a href="features.commandline.html" class="link">Command line usage of PHP</a>
       for more information.
      </span>
     </li>
     <li class="listitem">
      <span class="simpara">
       Writing desktop applications. PHP is probably
       not the very best language to create a desktop
       application with a graphical user interface, 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 <a href="http://gtk.php.net/" class="link external">&raquo;&nbsp;its
       own website</a>.
      </span>
     </li>
    </ul>
   </p>
   <p class="para">
    PHP can be <a href="install.html" class="link">used</a> on all major operating systems, including
    Linux, many Unix variants (including HP-UX, Solaris and OpenBSD),
    Microsoft Windows, Mac OS X, RISC OS, and probably others.
    PHP has also support for most of the web servers today. This
    includes Apache, IIS, and many others. And this includes any
    web server that can utilize the FastCGI PHP binary, like lighttpd
    and nginx. PHP works as either a module, or as a CGI processor.
   </p>
   <p class="para">
    So with PHP, you have the freedom of choosing an operating
    system and a web server. Furthermore, you also have the choice
    of using procedural programming or object oriented
    programming (OOP), or a mixture of them both.
   </p>
   <p class="para">
    With PHP you are not limited to output HTML. PHP&#039;s abilities
    includes outputting images, PDF files and even Flash movies
    (using libswf and Ming) generated on the fly. You can also
    output easily any text, such as XHTML and any other XML file.
    PHP can autogenerate these files, and save them in the file
    system, instead of printing it out, forming a server-side
    cache for your dynamic content.
   </p>
   <p class="para">
    One of the strongest and most significant features in PHP is its
    support for a <a href="refs.database.html" class="link">wide range of databases</a>. 
    Writing a database-enabled web page is incredibly simple using one of
    the database specific extensions (e.g., for <a href="book.mysqli.html" class="link">mysql</a>),
    or using an abstraction layer like <a href="book.pdo.html" class="link">PDO</a>, or connect
    to any database supporting the Open Database Connection standard via the
    <a href="book.uodbc.html" class="link">ODBC</a> extension. Other databases may utilize
    <a href="book.curl.html" class="link">cURL</a> or <a href="book.sockets.html" class="link">sockets</a>,
    like CouchDB.
   </p>
   <p class="para">
    PHP also has support for talking to other services using protocols
    such as LDAP, IMAP, SNMP, NNTP, POP3, HTTP, COM (on Windows) and
    countless others. You can also open raw network sockets and
    interact using any other protocol. PHP has support for the WDDX
    complex data exchange between virtually all Web programming
    languages. Talking about interconnection, PHP has support for
    instantiation of Java objects and using them transparently
    as PHP objects.
   </p>
   <p class="para">
    PHP has useful <a href="refs.basic.text.html" class="link">text processing</a> features,
    which includes the Perl compatible regular expressions (<a href="book.pcre.html" class="link">PCRE</a>),
    and many extensions and tools to <a href="refs.xml.html" class="link">parse and access XML documents</a>.
    PHP standardizes all of the XML extensions on the solid base of <a href="book.libxml.html" class="link">libxml2</a>,
    and extends the feature set adding <a href="book.simplexml.html" class="link">SimpleXML</a>,
    <a href="book.xmlreader.html" class="link">XMLReader</a> and <a href="book.xmlwriter.html" class="link">XMLWriter</a> support.
   </p>
   <p class="para">
    And many other interesting extensions exist, which are categorized both
    <a href="extensions.html" class="link">alphabetically</a> and by <a href="funcref.html" class="link">category</a>.
    And there are additional PECL extensions that may or may not be documented
    within the PHP manual itself, like <a href="http://xdebug.org/" class="link external">&raquo;&nbsp;XDebug</a>.
   </p>
   <p class="para">
    As you can see this page is not enough to list all
    the features and benefits PHP can offer. Read on in
    the sections about <a href="install.html" class="link">installing
    PHP</a>, and see the <a href="funcref.html" class="link">function
    reference</a> part for explanation of the extensions
    mentioned here.
   </p>
  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="intro-whatis.html">What is PHP?</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="tutorial.html">A simple tutorial</a></div>
 <div class="up"><a href="introduction.html">Introduction</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>