1、下载 安装 apache:官网 http://httpd.apache.org/download.cgi#apache24下载httpd-2.2.25-win32-x86-no_ssl.msi并 安装 2、下载 安装 PHP:官网http://windows.php.net/download/#php-5.4下载 php-5.4.19-Win32-VC9-x86.zip 并解压的E:\PHP目录 3、 配置
1、下载安装apache:官网 http://httpd.apache.org/download.cgi#apache24 下载httpd-2.2.25-win32-x86-no_ssl.msi并安装
2、下载安装PHP:官网http://windows.php.net/download/#php-5.4 下载 php-5.4.19-Win32-VC9-x86.zip 并解压的E:\PHP目录
3、配置php
在 ZIP 包中有两个 ini 文件,php.ini-development和 php.ini-production。官方手册中建议使用 php.ini-production,复制所选择的php.ini-production 并将其重命名为 php.ini。比如我把将 php.ini-development复制到E:\php,并命名为php.ini 。
php.ini 中正确设定了extension_dir 和 doc_root 指令的值。
这些指令依赖于 PHP 被安装的系统。打开php.ini 文件,搜索“extension_dir”,将这里的 extensions_dir 的值设置成 E:/php/ext 。即:extensions_dir = E:/php/ext 。
然后在php.ini中搜索“doc_root”,这个是你的WEB根目录。Apache的 doc_root 默认是安装目录的 htdocs 文件夹,比如我的是 E:\Program Files\Apache Software Foundation\Apache2.2\htdocs,所以我写的例子是:doc_root = E:\Program Files\Apache Software Foundation\Apache2.2\htdocs。
4、配置Apache
将以下三行加入到 Apache 的 httpd.conf 配置文件中以设定 Apache 2.x 的 PHP 模块:
# 对 PHP 5 用这两行:
LoadModule php5_module "E:\PHP\php5apache2_2.dll"
AddType application/x-httpd-php .php# 配置 php.ini 的路径
PHPIniDir "E:\PHP" //PHP的配置路径
注意,PHP 路径换成你自己的路径。特别要注意的是,Apache2.2版本要用 php5apache2_2.dll 。
至此,整个Apache下配置PHP完成,你可以建一个包含phpinfo()函数的php文件index.php,测试PHP在 Apache 下是否配置成功。测试文件内容如下:
echo phpinfo();
?>
将此文件index.php放到apache的web根目录E:\Program Files\Apache Software Foundation\Apache2.2\htdocs下 在浏览其中输入http://localhost/index.php进行测试

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

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

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

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),

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

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.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.
