Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 2968

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>Introduction</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Getting Started"
HREF="getting-started.html"><LINK
REL="PREVIOUS"
TITLE="Getting Started"
HREF="getting-started.html"><LINK
REL="NEXT"
TITLE="What can PHP do?"
HREF="intro-whatcando.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="chapter"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="getting-started.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="intro-whatcando.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="chapter"
><H1
><A
NAME="introduction"
>Chapter 1. Introduction</A
></H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="introduction.html#intro-whatis"
>What is PHP?</A
></DT
><DT
><A
HREF="intro-whatcando.html"
>What can PHP do?</A
></DT
></DL
></DIV
><DIV
CLASS="sect1"
><H1
CLASS="sect1"
><A
NAME="intro-whatis"
></A
>What is PHP?</H1
><P
>&#13;    <SPAN
CLASS="acronym"
>PHP</SPAN
> (recursive acronym for "PHP: Hypertext
    Preprocessor") 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
>&#13;    Simple answer, but what does that mean? An example:
   </P
><P
>&#13;    <TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
CLASS="EXAMPLE"
><TR
><TD
><DIV
CLASS="example"
><A
NAME="AEN78"
></A
><P
><B
>Example 1-1. An introductory example</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="php"
>&#60;html&#62;
    &#60;head&#62;
        &#60;title&#62;Example&#60;/title&#62;
    &#60;/head&#62;
    &#60;body&#62;

        &#60;?php 
        echo "Hi, I'm a PHP script!"; 
        ?&#62;

    &#60;/body&#62;
&#60;/html&#62;</PRE
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
>
   </P
><P
>&#13;    Notice how this is different from a script written in other
    languages like Perl or C -- instead of writing a program with lots
    of commands to output HTML, you write an HTML script with some
    embedded code to do something (in this case, output some
    text). The PHP code is enclosed in special <A
HREF="language.basic-syntax.html#language.basic-syntax.phpmode"
>start and end tags</A
>
    that allow you to jump into and out of "PHP mode".
   </P
><P
>&#13;    What distinguishes PHP from something like client-side JavaScript
    is that the code is executed on the server. If you were to have a
    script similar to the above on your server, the client would receive
    the results of running that script, with no way of determining what
    the underlying code may be. You can even configure your web server
    to process all your HTML files with PHP, and then there's really no
    way that users can tell what you have up your sleeve.
   </P
><P
>&#13;    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't be afraid reading the long
    list of PHP's features. You can jump in, in a short time, and
    start writing simple scripts in a few hours.
   </P
><P
>&#13;    Although PHP'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"
>What can PHP do?</A
> section.
   </P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="getting-started.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="intro-whatcando.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Getting Started</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="getting-started.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>What can PHP do?</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>