search
Homephp教程php手册php和apache2的配置

1,安装apache2http://httpd.apache.org/download.cgi 下载php解压即可 php-5.3.5-Win32-VC6-x86.zip http://dldx.csdn.net/fd.php?i=149641054414838s=8f59530d135ffccd6663f9f784f24f5f 这里要强调:如果找不到php5apahce2.dll文件 或配制不成功 ! 请不要下

1,安装apache2 http://httpd.apache.org/download.cgi

下载php解压即可 php-5.3.5-Win32-VC6-x86.zip    http://dldx.csdn.net/fd.php?i=149641054414838&s=8f59530d135ffccd6663f9f784f24f5f

这里要强调:如果找不到php5apahce2.dll文件 或配制不成功 ! 请不要下载的php高版本的,或vc9 vc11版的,可能不会成功,还有就是在php网站下载时不要下载二进制的,要下载zip 的,

还有就是你的apache是什么版本的  在#加载php 模块提定文件时要注意 !    如果是apahce2.2的话就选提定php5apache2_2.dll文件  apahce2的话就指定php5apache2.dll文件

2,

在 apahce/config 目录中找到httpd.conf

加入以下代码

要找到你解压后的php目录

#加载php 模块
LoadModule php5_module D:/php/php-5.3.5/php5apache2.dll
#初始化php文件
PHPIniDir "D:/php/php-5.3.5"
AddType application/x-httpd-php .php .phtml


这个可以不用配,默认在apahce 目录下htdocs文件下  放入你的php项目网页

# config 虚拟目录
<ifmodule dir_module>
 DirectoryIndex index.html index.htm index.php
 Alias /myVoid "D:/php/pro"
<directory d:>
#权限访问设置
Order aliow.deny
Allow from all
</directory>
</ifmodule>

在php目录中找到php.ini-developers 把文件名改为 php.ini

 打开php.ini文件   ctrl+f 搜索extension_dir = 把前面的;注释去掉,改为以下代码: 要指定你的php解压后的路径

 On windows:
 extension_dir = "D:/php/php-5.3.5/ext"




测试

在里指定的目录中写个文件 hello.php

<?PHP phpinfo();
?>



php和apache2的配置

OK------------------------------------------------


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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SecLists

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.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function