PHP and MySQL

Source: Internet
Author: User
I want to apply PHP and MySQL, but how can I install and run it? What is the most basic thing I should know, so that a simple PHP-MySQL can work with programs? This is a basic tutorial. No weird code, just some basics.

I want to apply PHP and MySQL, but how can I install and run it? What is the most basic thing I should know, so that a simple PHP-MySQL can work with programs?

This is a basic tutorial. No weird code, just some basics.

A large number of tutorials are based on UNIX machines. This tutorial will focus on Windows platforms. However, apart from the installation part, it is more or less specific to Windows, and the other part is the same for all platforms.

In this tutorial, we will build a small website step by step and apply the following features of PHP and MySQL:

1. view the database;
2. compile database records;
3. modify database records;
4. delete database records.

We will learn MySQL and PHP at the same time and feel them together.

Section 1-collect and establish necessary projects

Good. start your work. To get started with PHP-MySQL, we need some preparation:

1. run the web server;
2. increase PHP extension;
3. run MySQL.

Step 1: obtain and install the Web server

Let's assume that there is already a running web server on your machine. There are several useful web server exploitation programs in Windows. One thing to worry about is that the web server you selected to run php/mysql should support expansion.

OmniHTTPd (http://www.omnicron. AB .ca/httpd/, which is a very good free web server.

Once you get the installation file from the site, double-click it and install the web server. If you select the application default value during installation, you will install it in c: \ httpd. Once the installation is successful, the installer starts the web server with a welcome window. a new icon is displayed in the windows system tray.

Now, the first step is complete.

Step 2: Download and install the PHP release

It is easy to get the PHP Win32 release: just go to http://www.php.net/download-php.php3 and select the best location.

Installing PHP on OmniHTTPd is very simple.

First Unzip the installation file to your hard disk, for example, in c: \ php.

Copy 'php3. ini-dist 'to your' % Windows' directory and renamed 'php3. ini '(c: \ windows in Win95/98 and c: \ WinNT in winnt/Win2k ).

Compile the php3.ini file as follows:

Change 'extension _ dir' to your PHP installation directory (c: \ php), or store the 'php3 _ *. dll 'directory.

Select the module that you want to import at PHP startup. You should comment out the 'extension = php3 _ *. dll 'line and load it into these modules (be sure to comment out extension = php3_mysql.dll ). Some modules require additional libraries installed on your system to work properly.

Php q & A set (http://www.php.net/FAQ.php3) has

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.