If you want to view the contents of the PHP file, that is, the source program, you can open it with Notepad, and WORD processing tools such as Word can see the contents of PHP. If you want to view PHP as a web page, you must first install PHP and APACHE server.
The installation method is as follows:
Apache/
Is a multi-threaded structured query language (SQL) database server. SQL is the most popular database language in the world. MySQL has very high execution performance, very fast running speed and is very easy to use.
I downloaded the version of Windows, and the latest version is: 5.0.4 Beta.
PhpMyAdmin has been fixed, renamed to php.ini and copied to the windows directory.
Remember to give the server read access to PHP.ini on NTFS.
Look for extension_dir and change it to "D:/php/ext".
Find the Windows extension and draw a line below it; Remove the semicolon with extension =php_***. Dll, and support this component. I removed the semicolon of extension = PHP _ gd2.dll extension = PHP _ mbstring.dll extension = PHP _ MySQL.dll.
Php5 doesn't support mysql by default, so we need to add support for it. Except extension=php_mysql.dll, there is a libmysql.dll file in the Php directory, copy it to the system32 folder of the system, and copy php.ini to the windows directory.
At this point, the PHP environment has been basically configured successfully.
Create a file named test.php in the WEB root directory with the following contents.
& lt? echo phpinfo(); ? & gt
Restart the apache service and open http://localhost/test.php with a browser.
If you can see the output information of php configuration, it will be successful.
Install mysql
Install mysql into the specified directory, and then the installer will guide you to configure it step by step. But strangely, the Mysql icon did not appear in the final taskbar.
Modify the root password of mysql database
Enter lifeline mode with cmd and enter the following command: (Note: d:\mysql is the mysql installation directory)
cd d:\mysql\bin
Mysqladmin -u root -p password 123456
Enter and appear
Enter password: (Note: This means that you enter the original password. The password is empty when installing for the first time, so just press Enter)
At this point, the password of the account root in mysql is changed to 123456, and the installation is completed.
Configure php.ini and test mysql
Find extension _ directory = ". /"and change it to extension_dir = "D:/php/ext"
find
; extension=php_mysql.dll
"Will"; " Remove and change to
extension=php_mysql.dll
find
; session.save_path = "/tmp "
"Will"; " Delete the directory where the session is saved, for example
session . save _ path = " D:/PHP/session _ temp "
Restart apache service
Create a testdb.php file in the Web root directory with the following contents:
& lt? Server-side programming language (abbreviation of professional hypertext preprocessor)
$link=mysql_connect('localhost ',' root ',' 123456 ');
If (! $link) echoes "Failed";
Else echoes "success";
MySQL _ close();
& gt
Open http://localhost/testdb.php with a browser, and it will be OK if the output is successful.
Installation configuration of phpmyadmin
Unzip phpmyadmin-v2.6.2-pl1.zip to the WEB root directory and rename the folder to phpmyadmin or other.
Open config.inc.php in the phpmyadmin directory.
find
$ CFG[' Servers '][$ I][' user ']= ' root ';
$ CFG[' Servers '][$ I][' password ']= ' 123456 ';
Fill in the user name and password respectively.