PHP4 + WIN2000 + IIS Confinder Tutorial

xiaoxiao2021-03-06  118

First step: decompression

Download the PHP's compression package, the first thing you have to do is decompressed, which is put on all files required to run PHP - including scripting execution engines, some extensions, dynamic connection libraries, etc. Step 2: Configure php.ini

Copy all files in the decompressed folder to a directory you want to install (such as C: / PHP4), after completing this step, you open the C: / PHP4 directory, you should see a file: PHP. Ini-dist, this is the PHP configuration file. Now you need to open and edit this file, pay attention, now this file extension is .ini-dist, you need to modify the extension to .ini, and notepad open. Once opened, you will see many options - but you need to modify the options very limited. 1. First, find (recommended to use Notepad's lookup feature) short_open_tag = this place, this place is used to set the

If set to 1, your server starts, automatically supports session, you can open it when you write the code. If set to 0, you need to manually open. For beginners, we recommend setting to 1. The third step copy file is configured in this file php.ini, copy this file to the system directory, Win2000 is C: / WinNT /, Win XP is C: / Windows (of course, sometimes the directory name is not complete, but must be To copy it to the system directory). In this way, this file will be loaded automatically by the server. Then copy the PHP4TS.DLL of the following C: / PHP4 / below to C: / WinNT / System32 (or C: / Windows / System), if your machine has both system32 folders, and SYSTEM Folder, you can copy one for each folder.

Fourth steps and IIS established associations

Open the Internet information service inside "Administrative Tool" (XP system needs to be found from the Control Panel -> Management Tool), in short, the IIS manager, find the "default site" -> property, select the "Main Directory" tab, click below "Configuration" button, go to the Application Configuration window, select the Mapping tab, and click the "Add" button. Let's add a map of the .php file extension. In the window that opens "Add, Delete Application Extension Mappings", select "Browse" in "Executable File", find the "c: / php4/sapi/php4isapi.dll" (if you open this Directory, did not find this file, one must be that you don't have the file type "all files" or .dll files in the Open File dialog box, then fill in the PHP file you want in the "extension" below. Extension, you can use ".php", "pHP4", etc. Also pay attention to the following "Scripting Engine" to check in. Thus later, click "OK" to close all windows, turn off the IIS manager, and your PHP configuration is complete! ! Of course, you can set up index.php, default.php files such as Index.php, Default.php in the Manager "Document" tab as the default home page. The fifth step restarts IIS and tests this, and your PHP has been fully configured. You must be eager to try, you want to prepare a PHP program immediately, don't worry. Now you need to complete the last one - restart IIS. You can restart your machine directly. If you don't want to restart your machine, you can restart IIS: Enter the "Command Prompt", type: Net Stop Iisadmin Enter, after the service stops successfully, type NET START W3SVC Enter If prompt starts success, then your IIS It has been restarted. Now you can write your first PHP program! ! Create a text file, type the following code: Then save this file to your home directory or a virtual directory, named show_info.php (name is arbitrary, but the extension must Is your PHP file extension), I assume that you save this file to your machine's MyPHP virtual directory, then you can now open your browser, type the address: http://127.0.0.1/myphp/show_info.php At this time, if you see the output of the PHP version information and configuration information, congratulations, you have succeeded! ! !

转载请注明原文地址:https://www.9cbs.com/read-102398.html

New Post(0)