First download php-5.1.1-installer.exe
More than 2 m, click it, and click OK. Run the command and go to disk D. click Next. Create a directory named PHP and create the file info. php and enter the code:
<HTML> <Body> <? Phpinfo ();?> </Body> <HTML> |
Data in IIS: http: // localhost/PHP/info. php
If a long string of PHP version 5.1.1 appears, congratulations. The configuration is complete.
:
Create PHP/data/DB. mdb, create the table szd_t, and enter the data ,:
Create the file default. php. input:
<? $ Conn = new COM ("ADODB. Connection "); $ Connstr = "driver = {Microsoft Access Driver (*. mdb)}; DBQ =". realpath ("Data/DB. mdb "); $ Conn-> open ($ connstr ); $ Rs = new COM ("ADODB. recordset "); $ RS-> open ("select * From szd_t", $ Conn, 1, 1 ); While (! $ RS-> EOF ){ $ F = $ RS-> fields (1 ); Echo $ F-> value; $ RS-> movenext (); } ?> |
Browse, and print the record you just logged in the database. It's successful. Hahaha, it's finished. :