The relationship between PHP and PHP MySQL _php Foundation

Source: Internet
Author: User
Tags install php learn php php and mysql php mysql php website zend
This tutorial does not want you to fully understand the language, only to enable you to join the development of dynamic Web sites as soon as possible. I assume you have some basic knowledge of HTML (or HTML editors) and some programming ideas.
Brief introduction
PHP is one of the tools that will allow you to generate dynamic Web pages. PHP representative: Hypertext Preprocessor (Php:hypertext preprocessor). PHP is completely free, and you can download it free from the official PHP site (http://www.php.net) without spending money. PHP complies with the GNU Public License (GPL), under which many popular software such as Linux and Emacs are born. You can gain unlimited access to the source code, and even add the features you need to yourself. PHP can be run on most Unix platforms, Gun/linux and Microsoft Windows platforms. How to install PHP data on a PC or UNIX machine in a Windows environment can be found on the PHP website, and you can also check out the "PHP Installation all Ready" feature article of the Web page Pottery bar. The installation process is simple.
If your machine solves 2000 problems, then PHP has no bug problem!
History
Three years ago, Rasmus Lerdorf created the Personal homepage tool (Personal home page tools) to create his online resume. This is a very simple language. Subsequently, more and more people 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 evolves into a rich language, and it is still growing.
Although PHP is easy to learn, it is slower than Mod_perl (The Perl module that is implanted into the Web server). Now there is a new engine called Zend that can be compared to the mod_perl speed, and PHP4 can take advantage of the engine. Now, PHP4 official version has been released, you can go to the official PHP site to download. 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.
PHP's application has grown significantly in personal web projects. According to Netcraft's October 1999 report, there are 931,122 domains and 321,128 IP addresses using PHP technology.
The Advanced place of PHP
There are many benefits to applying PHP. Of course the known disadvantage is that PHP, because it is an Open-source project, has little business support, and the resulting slow execution rate (until PHP4). But the PHP mailing list is very useful and unless you're running a very popular site like Yahoo! or Amazon.com, you won't be able to feel the speed of PHP different from any other. At least I don't feel it! Well, let's look at the benefits 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 documents and work hard to write a decent program. Just learn some basic syntax and language features and you can start your PHP coding trip. After that, if you have any trouble with the coding process, you can also read the relevant documents.
PHP syntax is similar to c,perl,asp or JSP. For those who are familiar with one of the above languages, PHP is too simple. On the contrary, if you know more about PHP, you will be easy to learn about several other languages.
You'll only need 30 minutes to master all of the core language features of PHP, you may already know the HTML very well, even if you've already learned how to use editing software or hand-crafted Web sites. Because the PHP code can be easily added to your site, you can design and maintain the site at the same time, you will be very easy to join PHP to make your site more dynamic characteristics.
Database connection
PHP can be compiled into functions that have connections to many databases. PHP and MySQL are now the perfect combination. You can also write your own peripheral functions to access the database indirectly. This way you can easily change the encoding to accommodate this change 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 before, PHP has entered a period of rapid development. It may be difficult for a programmer to extend additional functionality for PHP, but it is not difficult for a PHP programmer.
Object Oriented Programming
PHP provides classes and objects. Web-based programming is a great need for object-oriented programming capabilities. 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 runs a separate process for every CGI program that is running. 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 people would like to install it in a CGI way. Embedded PHP can have a higher scalability.
More Features
In order to be more suitable for web programming, PHP developers have developed many of the popular base libraries around the periphery, which contain more easily available layers. You can use PHP to connect most databases, including Oracle,ms-access,mysql. You can paint on flies, write programs to download or display e-mail. You can even complete network-related functions. Best of all, you can choose which features you need for your PHP installation version. The quote from Nissan's Xterra is that PHP can do what you want it to do and do everything!

Introduction to MySQL
MySQL is a semi commercial database that is popular with people in the Linux community. MySQL is available to run on most Linux platforms (I386,SPARC,ETC), as well as a few non-Linux or even non-UNIX platforms.
License fee
MySQL's popularity largely stems from its ease, except for a slightly unusual license fee. The price of MySQL varies with the platform and installation mode. MySQL Windows versions (NT and 9X) are not free under any circumstances, and any UNIX variant (including Linux) MySQL is free if it is installed by the user or by the system administrator rather than by a third party, and the third scheme must pay the license fee.
Price
Platform Installation method Price
Windows nt,9x any 200 dollars
Free UNIX or Linux installation
Unix or Linux third party installation 200 USD
Requires an application component of 200 dollars
Can get a variety of support contracts, too much content is no longer listed, the latest quotations can be consulted MySQL site.
3, installation
Most of the major package formats (RPM, DBE, TGZ) can be obtained at the MySQL site, and the client library and various language "wrappers" (wrapper) can be obtained in separate RPM formats. The RPM format installation is not much of a hassle and requires no initial configuration. The RC3.D (for example, redhat RPM) generates an initial script, so the MySQL daemon is started when restarted in multiuser mode. The MySQL daemon (mysqld) consumes very little memory (the overhead of each daemon using 500K memory and 4 m shared memory on Pentium 133 running Redhat 5.1) and is loaded onto the processor only when executing a real query, which means that for a small database, MySQL can be used fairly easily without having too much impact on other system functions.
Data type
A field that supports a large number of data types is a good thing. The usual integers, floating-point numbers, strings, and numbers are expressed in a variety of lengths and support the variable-length blob (Binary Large OBject) type. The integer digit segment is represented by the AutoIncrement option, and the Date Time field.
MySQL differs from most other database systems by providing two relatively infrequently used field types: Enum and set. An enum is a type of enumeration that is very good for Pascal-language enumeration types that allow programmers to see field values similar to ' Red, ' green ', ' Blue ', and MySQL stores only these values as one byte. Set is also borrowed from Pascal, it is also an enumeration type, but a single field can store multiple values at once, this ability to store multiple enumeration values may not give you some impression (and may threaten the third paradigm definition), but proper use of set and contains keywords can save a lot of table joins, Can achieve good performance improvement.
5. SQL compatibility
MySQL contains a number of transformations that are different from the SQL standard, and most of them are designed to compensate for the inadequacy of the SQL language scripting language. However, other extensions do make MySQL unique, for example, a link clause search that automatically ignores case. MySQL also allows user-defined SQL functions, in other words, a programmer can write a function and then integrate it into MySQL, and it behaves no differently from any basic function such as SUM () or AVG (). The function must be compiled into a shared library file (. so file), and then loaded with a load function command.
It also lacks some of the commonly used SQL features, with no sub selections (queries in queries). The view is gone. Of course most subqueries can be overridden with a simple join clause, but sometimes it's easier to think about a problem with two nested queries than a big one. Similarly, the view only hides the WHERE clause for the programmer, but that is another convenience that programmers expect.
Stored procedures and triggers
MySQL does not have a stored procedure (Stored Procedure) language, which is the biggest limitation for programmers accustomed to enterprise-class databases. Multi-statement SQL commands must be coordinated by client code, which allows for multiple statements to run, thanks to a fairly robust query language and the ability to lock and unlock tables with clients.
7. Referential integrity (referential Integrity-ri)
One of the main drawbacks of MySQL is the lack of a standard RI mechanism; however, MySQL creators are not ignoring the wishes of their users and providing some solutions. One of these is to support a unique index. The lack of rule restrictions (a fixed range limit on the domain of the Spike field) is compensated by a large number of data types. does not simply provide a check constraint (the limit of the value of one field to another field in the same row), an external keyword, and a "cascade delete" feature that is often associated with RI. Interestingly, when these features are not supported, the SQL parser tolerates the syntax of these statements. This is done to easily migrate the database to MySQL. This is a good attempt, and it really leaves the door for future support; However, those who do not read the document carefully may mistakenly assume that these functions actually exist.
7. Safety
The biggest complaint I ever had about MySQL was its security system, whose only drawback was complexity, not standard, and only changed when Mysqladmin was invoked to reread the user's permissions. The usual SQL Grant/revoke statements are supported in the most recent version, but at least they are now available. MySQL's authors have extensively documented their specific security systems, but they do need a learning process that may be the only way to do it.

Apache+php+mysql is the best match, is also the best collocation with the Enterprise network,

If you learn PHP, then you can find a lot of tutorials in the network, in fact, the best way to learn any program is to write, keep writing non-stop look.

As a website of course the best is Dreamweaver, it can write a lot of code, can also be designed!
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.