在Windows系统上安装PHP应用程序服务器
安装 PHP 应用程序服务器 (Windows)
若要处理动态 Web 页,您需要应用程序服务器。应用程序服务器是一种软件,它帮助 Web 服务器处理包含服务器端脚本或标签的 Web 页。当浏览器请求这样一个页时,Web 服务器先将该页传递给应用程序服务器进行处理,然后再发送到浏览器。有关更多信息,请参见了解 Web 应用程序。
确保运行 IIS 的系统上安装了 PHP 应用程序服务器并且正在运行。(IIS 可能位于您的硬盘或远程 Windows 计算机上。)您可以从 PHP Web 站点(网址为 www.php.net/downloads.php)下载并安装 PHP 应用程序服务器。
在 PHP 5 中,默认情况下,Windows 安装程序并未安装或启用允许 PHP 处理 MySQL 数据库服务器的扩展。您必须手动安装并启用该扩展。
若要在 Windows 系统上安装 PHP 5,请执行以下操作:
- 如果可行,使用管理员帐户登录到 Windows 系统。
- 从 PHP Web 站点 www.php.net/downloads.php 下载 Windows PHP 5.x 安装程序。
- 双击下载的安装程序文件,并按照屏幕上的安装说明进行操作。
- 成功安装 PHP 后,从 PHP Web 站点 www.php.net/downloads.php 下载 Windows PHP 5.x 压缩包,然后将该包解压缩到您硬盘上的临时文件夹中。该压缩包包含处理 MySQL 所需的扩展。
- 在包含解压缩后的文件的临时文件夹中,找到名为 ext 的文件夹,并将其复制到 C:\PHP\ 文件夹中。该 ext 文件夹包含常用 PHP 扩展,包括 MySQL 扩展。
- 在 C:\Windows 文件夹中,找到名为 php.ini 的文件,并在记事本中打开该文件。必须编辑该文件以启用 MySQL 扩展。
- 在 php.ini 文件中找到以下行:extension_dir = "./"该行指定 PHP 查找扩展的位置。
- 编辑该行,如下所示: 提示不要忽略最后的斜杠。extension_dir = "C:\PHP\ext\"
- 在 php.ini 文件中找到以下行:“;extension=php_mysql.dll” 该行开始的分号 (;) 指示 PHP 忽略该行。
- 删除该行开始的分号以启用扩展成为:“extension=php_mysql.dll”
- 保存并关闭 php.ini 文件。
- 在包含解压缩后的 PHP 文件的临时文件夹中,找到名为 libmysql.dll 的文件,并将其复制到 C:\Windows\system32 文件夹中。IIS 处理 PHP 5 和 MySQL 需要该文件。
- 重新启动 IIS。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solve the problem of third-party interface returning 403 in Node.js environment. When we use Node.js to call third-party interfaces, we sometimes encounter an error of 403 from the interface returning 403...

The page is blank after PHP connects to MySQL, and the reason why die() function fails. When learning the connection between PHP and MySQL database, you often encounter some confusing things...

Many website developers face the problem of integrating Node.js or Python services under the LAMP architecture: the existing LAMP (Linux Apache MySQL PHP) architecture website needs...

Detailed explanation of the problem of deducting balances in combination with PHP optimistic locks and transactions in this article will analyze in detail a balance deduction using PHP, optimistic locks and database transactions, only...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.

The problem of comparing and synchronizing BeyondCompare files: Case sensitivity failure when using Beyond...

How to avoid the third-party interface returning 403 error in the Node environment. When calling the third-party website interface using Node.js, you sometimes encounter the problem of returning 403 error. �...

Mastering Debian system log monitoring is the key to efficient operation and maintenance. It can help you understand the system's operating conditions in a timely manner, quickly locate faults, and optimize system performance. This article will introduce several commonly used monitoring methods and tools. Monitoring system resources with the sysstat toolkit The sysstat toolkit provides a series of powerful command line tools for collecting, analyzing and reporting various system resource metrics, including CPU load, memory usage, disk I/O, network throughput, etc. The main tools include: sar: a comprehensive system resource statistics tool, covering CPU, memory, disk, network, etc. iostat: disk and CPU statistics. mpstat: Statistics of multi-core CPUs. pidsta
