search
Homephp教程php手册Windows IIS环境下安装和配置PHP开发环境

Windows IIS环境下安装和配置PHP开发环境

Jun 13, 2016 am 10:29 AM
iisphpwindowsoneDownbyBagcompressionandInstalldevelopenvironmentofConfiguration

一、首先把php的压缩包(这里以PHP4.3.2为例)解压到C:php-4.3.2-Win32目录中,然后从其中找到一个叫php.ini-recommended的文件,把他更名为php.ini。

二、打开该文件,找到extension_dir = "./" ,将其改为 extension_dir = "C:php-4.3.2-Win32extensions" ;再找到 session.save_path = /tmp ,将其改为 session.save_path = C:php-4.3.2-Win32sessions 。(注:此时你需要在C:php-4.3.2-Win32目录下建立sessions文件夹,以存放session 。

三、将修改好的php.ini文件拷贝至C:winnt目录下,将C:php-4.3.2-Win32下的php4ts.dll文件拷贝到C:winntsystem32目录下。

四、打开"Internet服务管理器",选择你想支持PHP的站点,打开属性页,点击"ISAPI筛选器"选项卡,点击"添加",在弹出的"筛选器属性"窗口的"筛选器名称"中填入"php";在"可执行文件"中填入"C:php-4.3.2-Win32sapiphp4isapi.dll"(如图一所示),点击确定。

五、点击"主目录"选项卡,选择"应用程序设置"中的"配置"按钮,在弹出的"应用程序配置"窗口中点击"添加"按钮,在弹出的"添加/编辑应用程序扩展名映射"窗口中的"可执行文件"中填入"C:php-4.3.2-Win32sapiphp4isapi.dll","扩展名"一项填入"php" 。 (如图二所示)。

OK,一切搞定,重起IIS,到你的页面文件目录下写一个phpinfo,测试一下PHP文件能否被正确解析。如果产生500错误,请确定你没有忘记第三步。

 

                                               图1

 

                                                          图2

 

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.