Table of Contents
VC9 x86 Thread Safe (2013-Jun-05 22:49:25)
Home Backend Development PHP Tutorial Winodws 装配 PHP开发环境

Winodws 装配 PHP开发环境

Jun 13, 2016 am 11:27 AM
apache http php windows

Winodws 安装 PHP开发环境

安装环境:Windows7 64位

目标PHP运行环境: PHP5.4和Apache2.4

1,打开PHP windows的官方网站:http://windows.php.net/download/#php-5.5

2,选择Apache作为服务器,PHP5.4 线程安全版。

VC9 x86 Thread Safe (2013-Jun-05 22:49:25)

因为笔者机器上安装了VC9和10没有安装11所以没有选择5.5. php5.5需要安装VC10.可以去添加删除程序里面看你目前安装的Microsoft Visual C++ 20xx Redistributable的版本。如果安装了11可以下载PHP5.5. 或者你自己手动去下载安装个。

?

下载和配置Apache2.4

3,因为我们选择的是PHP5.4所以我们不能使用Apache.org官网的apache,那个只支持VC++ 9.不支持VC++11。另外在你的机器上确定安装了Visual C++ Redistributable for Visual Studio 2012?x86 or x64?

所以我们去http://www.apachelounge.com/download/现在32位或者62位的。笔者是64位win7系统,但是我使用了32位。说明32位兼容64位操作系统。

4,都是免安装版的。直接解压就可以了。

5,启动Apache2前需要配置ServerRoot和DocumentRoot的地址。否则会启动不了。

ServerRoot配置到你的Apache的解压目录。 DocumentRoot配置你的网站地址,或者随便配置个地址,复制Apahce目录/htdocs/index.html文件到配置的那个地址。

6,打开localhost,就可以看到It Works了。

?

配置PHP和Apache

可以参考http://us1.php.net/manual/zh/install.windows.apache2.php

和http://www.cnblogs.com/pharen/archive/2012/02/06/2340628.html

?

1,解析PHP,

LoadModule php5_module "D:/Develop/PHP/php5apache2_4.dll"

AddHandler application/x-httpd-php .php .html .htm

?

2,添加PHP初始化目录。也就是你解压PHP压缩包之后的那个目录PHPIniDir "D:/Develop/PHP"

?

3,添加首页支持PHP文件

DirectoryIndex index.html

      改为

        DirectoryIndex?index.php?index.html

?

PHP部分:

4, 设置PHP扩展包的具体目录,找到

        ; On windows:
        ; extension_dir = "ext"

      改为 (值是ext文件夹的目录)

        ; On windows:
        ? extension_dir = "D:/Develop/PHP/ext"

?

5,开启相应的库功能。

;extension=php_mysql.dll去掉前面的分号(注释),即改为

extension=php_mysql.dll

?

6,设置时区

;date.timezone =

        改为

        date.timezone = Asia/Shanghai

?

PHP文档手册:

http://www.php.net/manual/zh/

?

Statement of this Website
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 Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1670
14
PHP Tutorial
1274
29
C# Tutorial
1256
24
Composer: Aiding PHP Development Through AI Composer: Aiding PHP Development Through AI Apr 29, 2025 am 12:27 AM

AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

How to handle high DPI display in C? How to handle high DPI display in C? Apr 28, 2025 pm 09:57 PM

Handling high DPI display in C can be achieved through the following steps: 1) Understand DPI and scaling, use the operating system API to obtain DPI information and adjust the graphics output; 2) Handle cross-platform compatibility, use cross-platform graphics libraries such as SDL or Qt; 3) Perform performance optimization, improve performance through cache, hardware acceleration, and dynamic adjustment of the details level; 4) Solve common problems, such as blurred text and interface elements are too small, and solve by correctly applying DPI scaling.

What is the significance of the session_start() function? What is the significance of the session_start() function? May 03, 2025 am 12:18 AM

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

Apache in Action: Web Servers and Web Applications Apache in Action: Web Servers and Web Applications Apr 28, 2025 am 12:21 AM

The main functions of ApacheHTTPServer include modular design, virtual host configuration and performance optimization. 1. Modular design implements functions by loading different modules, such as SSL encryption and URL rewriting. 2. Virtual host configuration allows multiple websites to be run on one server. 3. Performance optimization improves performance by adjusting parameters such as ServerLimit and KeepAlive.

H5: Key Improvements in HTML5 H5: Key Improvements in HTML5 Apr 28, 2025 am 12:26 AM

HTML5 brings five key improvements: 1. Semantic tags improve code clarity and SEO effects; 2. Multimedia support simplifies video and audio embedding; 3. Form enhancement simplifies verification; 4. Offline and local storage improves user experience; 5. Canvas and graphics functions enhance the visualization of web pages.

How to uninstall MySQL and clean residual files How to uninstall MySQL and clean residual files Apr 29, 2025 pm 04:03 PM

To safely and thoroughly uninstall MySQL and clean all residual files, follow the following steps: 1. Stop MySQL service; 2. Uninstall MySQL packages; 3. Clean configuration files and data directories; 4. Verify that the uninstallation is thorough.

How to use MySQL functions for data processing and calculation How to use MySQL functions for data processing and calculation Apr 29, 2025 pm 04:21 PM

MySQL functions can be used for data processing and calculation. 1. Basic usage includes string processing, date calculation and mathematical operations. 2. Advanced usage involves combining multiple functions to implement complex operations. 3. Performance optimization requires avoiding the use of functions in the WHERE clause and using GROUPBY and temporary tables.

What are the cross-platform development environments in C? What are the cross-platform development environments in C? Apr 28, 2025 pm 09:24 PM

Cross-platform development in C is recommended to use VisualStudioCode, CLion and QtCreator. 1. VisualStudioCode is lightweight and flexible, suitable for multi-platform development, but the initial configuration is more complicated. 2. CLion integrates CMake, suitable for cross-platform projects, but licenses are expensive. 3.QtCreator supports cross-platform development, with built-in Qt library, but the learning curve is steep.

See all articles