Home > Backend Development > PHP Tutorial > What is PHP? _PHP Tutorial

What is PHP? _PHP Tutorial

WBOY
Release: 2016-07-15 13:21:55
Original
1205 people have browsed it

PHP ("PHP: Hypertext Preprocessor", abbreviation of Hypertext Preprocessor) is a widely used open source multi-purpose scripting language. It can be embedded into HTML and is especially suitable for the web. development.

The above is a simple answer, but what does it mean? Please see the following example:

Example #1 An introductory example

<html>
    <head>
        <title>Example</title>
    </head>
    <body>

        <?php
        echo "Hi, I&#39;m a PHP script!";
        ?>

    </body>
</html>
Copy after login

Please note the difference between this example and other scripts written in C or Perl language - instead of writing a program with a large number of commands to output HTML, we wrote an HTML script in PHP with embedded Some code to do something (e.g. output some text in this case). PHP code is enclosed in special start and end characters, making it possible to enter and exit "PHP mode".

Unlike client-side JavaScript, PHP code runs on the server side. If you build code similar to the example above on the server, after running the script, the client will receive the results, but they will have no way of knowing how the code behind it works. You can even set up the web server to let PHP handle all HTML files, so the user has no way of knowing what the server is doing.

One of the great things about using PHP is that it is extremely simple for beginners, while also providing a variety of advanced features for professional programmers. Don’t be afraid when you see PHP’s long list of features. You can get started quickly, and you can write some simple scripts in just a few hours.

Although PHP is developed for the purpose of server-side scripting, in fact its functions are far from limited to this. Please read on for more information in the "What PHP Can Do" section. If you are interested in web programming, you can also read the concise tutorial.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/447023.htmlTechArticlePHP (PHP: Hypertext Preprocessor, abbreviation of Hypertext Preprocessor) is a widely used open A multi-purpose scripting language for source code, it can be embedded in HTML, especially suitable for...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template