How to use PHP on your home page

Source: Internet
Author: User
Recently, many people have asked me how to use PHP. let's write a PHP elementary application tutorial. Even if you know nothing about PHP, you can understand it ~~ 1. what is PHP? PHP is a new type of CGI Programming Language. it is easy to learn and use, and runs fast. it can easily and quickly compile and write powerful functions and run fast, and can run on Windows, Unix, and Linux platforms at the same time.

Recently, many people have asked me how to use PHP. let's write a PHP elementary application tutorial. Even if you know nothing about PHP, you can understand it ~~

1. what is PHP?

PHP is a new type of CGI Programming Language. it is easy to learn and use, and runs fast. it can easily and quickly compile and write powerful functions and run fast, it can also run Web background programs on Windows, Unix, and Linux platforms. It has built-in functions such as file upload, password authentication, Cookies operation, email sending and receiving, and dynamic GIF generation, PHP directly provides original connections to many databases, including Oracle, Sybase, S, Mysql, Informix, Dbase, Solid, and Access. it fully supports ODBC interfaces. PHP4.0 provides more web server support, such as Zeus, Netscape Enterprise, and Apache Win32 module.
(The above paragraph was transferred from the Internet. have you been dizzy ......)

In short, I understand that PHP is a dynamic WEB scripting language. That's easy... for example, all the forum systems here are php programs.

2. Where can I find the PHP source code?

We certainly cannot expect everyone to write PHP programs independently. As an ordinary web page maker, we can use ready-made PHP programs. Many sites provide free PHP source code downloads.
Among them, the most famous is the Chinese webmaster station (http://www.chinaz.com /). From this type of site, we can find the program source code we need.

3. how to use the downloaded PHP source code?

After the source code is downloaded, no one knows how to use it. Next I will explain it step by step.

(1) view the code instructions:

Generally, all downloaded programs have readme files, which tell you how to install and use this program. Some programs only need to upload all files for use. Some programs need to run install. php for installation, depending on the specific situation.

(2) There are two ways to debug the program. One is to build a local debugging environment on your machine for debugging, and the other is to upload the program to the home page server for debugging.

Local debugging: apache, php, and mysql are generally used to build a local debugging environment. Since these three software are installed, you need to modify the registry and many other settings. it is too complicated for beginners. I recommend using the phptraid software (:

1) PHP Server Builder for windows 1.3.

Includes:
Apache 2.0.47
PHP 4.3.3
Mysql 4.0.16
PHPMyadmin 2.5.4
Zend Optimizer 2.1.0

Http://www.myferly.com/

: Http://www.myferly.com/download/1.3/window...ws/VM/psb13.exe

Http://www.myferly.com/download/1.3/window.../NoVM/psb13.exe

========================================================== ==========================================

2. UniServer 2.7

Includes:
Apache 2.0.47
PHP 4.3.3
Zend Optimizer 2.1.0
PhpMyAdmin 2.5.3
MySQL 4.0.15
ActivePerl 5.8.0.806


Http://miniserver.sourceforge.net

#1: http://www.kphp.net/download.php? & Bbs_id = d... ype = 1 & doc_num = 5
#2: http://umn.dl.sourceforge.net/sourceforge/...niServer2_7.exe), the use of this software is very simple. You only need to run this program and install it in the C: \ apache Directory by default. When you run apache.exe, a dos window is displayed, indicating that apache is running. this window is always open. Put the php file to be debugged (for example, the file name is index. php) in the C: \ apache \ htdocs Directory, enter http: // 127.0.0.1/index in the browser. php, you can see the php running effect.

The home page space on the internet, free space rarely supports PHP, usually paid space. To use the PHP program, first check whether your home page supports PHP and determine the system of your server. This involves file attributes.
If it is a unix host, you need to modify the attributes of the file when debugging the PHP program. For example, we can often see that the file attribute should be changed to 777 or 755.

We can use FTP software to modify file attributes. Taking flashFXP as an example, when you connect to ftp, right-click the file and select Attrubites (CHMOD). in the displayed dialog box, enter the required value in Manual, the file attributes are modified. We can see that modifying attributes mainly restricts the reading and writing of files.
For Windows hosts, you do not need to modify any properties.

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.