PHP Novice: 1.PHP Introduction _php Tutorial

Source: Internet
Author: User
Tags php and mysql php introduction
PHP is a server-side scripting language that is easy to learn and use. With minimal programming knowledge, you can use PHP to build a truly interactive web site. This tutorial does not want you to fully understand the language, but it will allow you to join the development of dynamic Web sites as soon as possible. I assume you have some basic knowledge of HTML (or HTML editor) and some programming ideas.
1. Introduction
PHP is one of the tools that allows you to generate dynamic Web pages. PHP Web files are treated as normal HTML Web files and you can write PHP in the usual way of editing HTML when editing.
PHP representative: Hypertext Preprocessor (Php:hypertext preprocessor). PHP is completely free of charge and you can download it freely from the official PHP site (http://www.php.net). PHP complies with the GNU Public License (GPL), under which many popular software such as Linux and Emacs have been created. You can gain unlimited access to the source code and even add the features you need. PHP works on most Unix platforms, Gun/linux and Microsoft Windows platforms. Information on how to install PHP on a PC or UNIX machine in a Windows environment can be found on the official PHP site. The installation process is simple.
If your machine solves 2000 problems, then PHP does not have the millennium bug problem!
1.1 History
Three years ago, Rasmus Lerdorf created a personal page tool to create his online CV (Personal home page tools). This is a very simple language. A growing number of people subsequently took note of the language and made various suggestions for its expansion. In the selfless devotion of many people and the free nature of the source code of the language itself, it has evolved into a rich language and is now growing.
Although PHP is easy to learn, it is slower than Mod_perl (the Perl module that implants the Web server). Now with a new engine called Zend that can rival mod_perl speed, PHP4 can take advantage of the engine. PHP4 is still in the beta test phase. Andy Gutmans and Zeev Suraki are the main authors of Zend. You can go to the Zend site (http://www.zend.com) to learn more.
The application of PHP has grown significantly in the personal Web project. According to Netcraft's report in October 1999, there are 931,122 domains and 321,128 IP addresses using PHP technology.

1.2 The Advanced of PHP
There are many benefits to applying PHP. Of course, the disadvantage is that PHP is not commercially supported because it is an open source project, and the resulting execution speed is slow (until PHP4). But PHP's mailing lists are very useful and unless you're running a popular site like Yahoo! or Amazon.com, you won't feel the speed of PHP being any different. At least I didn't feel it! Well, let's take a look at the advantages of PHP:
-Learning process
I personally prefer PHP's very simple learning process. Unlike Java and Perl, you don't have to bury your head in more than 100 pages of documentation to learn how to write a decent program. As long as you know some basic grammar and language features, you can start your PHP coding journey. You can then go through the documentation if you are having trouble with the coding process.
PHP syntax with c,perl,asp or JSP. For those who are more familiar with one of these languages, PHP is too simple. Conversely, if you know more about PHP, you will be very easy to learn from several other languages.
You can get all the core language features of PHP in just 30 minutes, you probably already know the HTML very well, and you've even learned how to create a good-looking Web site with an editorial design software or by hand. Because PHP code can be easily added to your site, while you design and maintain the site, you can easy to join PHP to make your site more dynamic features.
-Database connection
PHP can be compiled into functions that are connected to many databases. PHP and MySQL are now a great combination. You can also write your own peripheral functions to access the database indirectly. With this approach, you can easily change the encoding to accommodate such changes when you replace the database you are using. Phplib is the most common set of base libraries that can provide general transaction needs.
-Scalability
As I said earlier, PHP has entered a period of rapid development. It may be difficult for a non-programmer to extend additional functionality to PHP, but it is not difficult for a PHP programmer.
-Object-oriented programming
PHP provides classes and objects. Web-based programming requires an object-oriented programming capability. PHP supports constructors, extraction classes, and so on.
-Scalability
Traditionally, the interaction of Web pages is achieved through CGI. The CGI program's scalability is not ideal because it opens a separate process for each of the running CGI programs. The solution is to compile the interpreter for the language that is often used to write CGI programs into your Web server (such as mod_perl,jsp). PHP can be installed in this way, although few would like to install it in a CGI manner. Built-in PHP can be more scalable.
-More Features
PHP developers have developed many of the most popular base libraries for Web programming, which contain easier-to-use layers. You can use PHP to connect most databases, including Oracle,ms-access,mysql. You can draw pictures on flies, write programs to download or display e-mails. You can even complete network-related functions. Best of all, you can choose which features you need for your PHP installation. Quoting Nissan's Xterra, PHP can do everything you want it to do and be omnipotent!
1.3 Competitor: asp,mod_perl,jsp
I certainly don't know what asp/jsp can do. But it's clear how easy it is to write that code, how expensive it is to buy them, and how expensive and powerful hardware they need. If you have a neutral view (like not being affected by sun and Microsoft's million dollars), please let me know by the way.
As far as I know, JSP is Java-based, so Java programmers can easily start coding. ASP is just a generic engine with the ability to support multiple languages, but the default is the most common or VBScript.
Mod_perl is as powerful as Perl, just a little faster.

http://www.bkjia.com/PHPjc/532276.html www.bkjia.com true http://www.bkjia.com/PHPjc/532276.html techarticle PHP is a server-side scripting language that is easy to learn and use. With minimal programming knowledge, you can use PHP to build a truly interactive web site. This tutorial does not want you to be completely ...

  • Related Article

    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.