A lot of people have been asking me how to use PHP, so I'm going to write a beginner php tutorial. Even if you know nothing about PHP, you can read it.
What's 1.PHP?
PHP, a new type of CGI programming language, easy to learn and easy to use, fast, can easily and quickly write a powerful, fast, and can run at the same time in Windows, Unix, Linux Platform Web background program, built-in file upload, password authentication, Cookies operation , mail transceiver, dynamic GIF generation and other functions, PHP directly for many databases to provide the original connection, including Oracle,sybase,postgres,mysql,informix,dbase,solid,access, and so on, fully support the ODBC interface. PHP4.0 provides more Web server support, such as Zeus, Netscape Enterprise, and Apache Win32 module.
(The above passage is the online turn, is not already see dizzy ...) )
In short, I understand that PHP is a dynamic web scripting language. It's so simple .... For example, I am here in the forum system, are all PHP programs.
2. Where to find the PHP source code?
We certainly can't expect everyone to write PHP programs independently. As an ordinary Web page producer, we can use ready-made PHP programs. Many sites offer free PHP source code downloads.
Among them, the most famous is the Chinese stationmaster Station (http://www.chinaz.com/). From this kind of site, we can find the program source code we need.
3. How to use the downloaded PHP source code?
The source code is downloaded, and someone doesn't know how to use it. I'll show you the following step-by-step instructions.
(1) View Code usage instructions:
General download to the program, there are readme files, tell you how to install the use of this program. Some programs only need to upload all the files, you can use. Some programs need to run install.php for installation, depending on the situation.
(2) There are two ways to debug a program. One is to build a local debugging environment on your own machine for debugging, and the other is to upload the program to the home page server for debugging.
Local debugging, generally using apache,php and MySQL three kinds of software to build a local debugging environment. Since installing these three software requires modifications to the registry and many other settings that are too complex for beginners, I recommend using the Phptraid software (download address:
1 PHP Server Builder for Windows 1.3
Contains:
Apache 2.0.47
PHP 4.3.3
Mysql 4.0.16
phpMyAdmin 2.5.4
Zend Optimizer 2.1.0
Official website: http://www.myferly.com/
Download Address: 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
Contains:
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
Official website: http://miniserver.sourceforge.net
Download Address #1:http://www.kphp.net/download.php?&bbs_id=d...ype=1&doc_num=5
Download Address #2:http://umn.dl.sourceforge.net/sourceforge/...niserver2_7.exe), the use of this software is very simple. You only need to run the program to install to the C:\apache directory by default. Run Apache.exe, a DOS window appears, showing Apache running, keeping the window open. To debug the php file (filename such as index.php), put into the C:\apache\htdocs directory, in the browser input http://127.0.0.1/index.php, you can see the effect of PHP run.
Online home space, free space There is little support for PHP, is generally paid space. To use a PHP program, first make sure that your home page is supported by PHP, and what your server system is. This involves a problem with the file attributes.
If you are a UNIX-class host, modify the properties of the file when you debug the PHP program. For example, we can often see the requirement to change the file attributes to 777 or 755 instructions.
We can modify the properties of the file through the FTP software. Take FLASHFXP Software as an example, in the connection to FTP, right-click on the file, will Attrubites (CHMOD) This option, in the pop-up dialog manual there to enter the required value, modify the file properties. As we can see, the modification attributes are mainly restricted to the reading and writing of files.
If you are a host of the window class, you do not need to modify any properties.