Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 8584

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 is PHP?</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="introduction.html">Introduction</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intro-whatcando.html">What can PHP do?</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-whatis" class="section">
   <div class="info"><h1 class="title">What is PHP?</h1></div>
   <p class="para">
    <acronym title="PHP: Hypertext Preprocessor">PHP</acronym> (recursive acronym for <em>PHP: Hypertext
    Preprocessor</em>) is a widely-used open source general-purpose
    scripting language that is especially suited for web
    development and can be embedded into HTML.
   </p>
   <p class="para">
    Nice, but what does that mean? An example:
   </p>
   <p class="para">
    <div class="example" id="example-1">
     <div class="info"><p><strong>Example #1 An introductory example</strong></p></div>
     <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
&lt;!DOCTYPE&nbsp;HTML&nbsp;PUBLIC&nbsp;"-//W3C//DTD&nbsp;HTML&nbsp;4.01&nbsp;Transitional//EN"<br />&nbsp;&nbsp;&nbsp;&nbsp;"http://www.w3.org/TR/html4/loose.dtd"&gt;<br />&lt;html&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;head&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;Example&lt;/title&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/head&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;body&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #0000BB">&lt;?php<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Hi,&nbsp;I'm&nbsp;a&nbsp;PHP&nbsp;script!"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">?&gt;<br /></span><br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/body&gt;<br />&lt;/html&gt;</span>
</code></div>
     </div>

    </div>
   </p>
   <p class="para">
    Instead of lots of commands to output HTML (as seen in C or Perl),
    PHP pages contain HTML with embedded code that does
    &quot;something&quot; (in this case, output &quot;Hi, I&#039;m a PHP script!&quot;).
    The PHP code is enclosed in special <a href="language.basic-syntax.phpmode.html" class="link">start and end processing
    instructions <code class="code">&lt;?php</code> and <code class="code">?&gt;</code></a>
    that allow you to jump into and out of &quot;PHP mode.&quot;
   </p>
   <p class="para">
    What distinguishes PHP from something like client-side JavaScript
    is that the code is executed on the server, generating HTML which
    is then sent to the client. The client would receive
    the results of running that script, but would not know
    what the underlying code was. You can even configure your web server
    to process all your HTML files with PHP, and then there&#039;s really no
    way that users can tell what you have up your sleeve.
   </p>
   <p class="para">
    The best things in using PHP are that it is extremely simple
    for a newcomer, but offers many advanced features for
    a professional programmer. Don&#039;t be afraid reading the long
    list of PHP&#039;s features. You can jump in, in a short time, and
    start writing simple scripts in a few hours.
   </p>
   <p class="para">
    Although PHP&#039;s development is focused on server-side scripting,
    you can do much more with it. Read on, and see more in the
    <a href="intro-whatcando.html" class="link">What can PHP do?</a> section,
    or go right to the <a href="tutorial.html" class="link">introductory
    tutorial</a> if you are only interested in web programming.
   </p>
  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="introduction.html">Introduction</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="intro-whatcando.html">What can PHP do?</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>