Heim  >  Artikel  >  Backend-Entwicklung  >  配置PHP服务器环境步骤详解

配置PHP服务器环境步骤详解

WBOY
WBOYOriginal
2016-07-25 08:54:031222Durchsuche
  1. #导入PHP5的模块
  2. LoadModule php5_module "D:/Program Files/PHP/php5apache2_2.dll"
  3. #URL中能够识别.php结尾的文件
  4. AddType application/x-httpd-php .php
  5. #URL中能够识别.phps结尾的文件
  6. AddType application/x-httpd-php-source .phps
  7. #网站默认PHP得主页
  8. DirectoryIndex index.html index.htm index.php default.php
  9. #PHP.ini 的存放目录
  10. #PHPIniDir "D:/Program Files/PHP"
复制代码

注意,PHP.ini 如果放在C:/WINDOWS(或C:/WINNT)下,就不用配置PHPIniDir

然后,用记事本打开:D:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf

在文件末尾添加一行: Include conf/extra/httpd-php5.conf

第四步,测试php服务器配置,检测php环境搭建成功与否? 重新启动 Apache,打开目录:D:/Program Files/Apache Software Foundation/Apache2.2/htdocs 新建文件:index.php 输入内容:

  1. phpinfo();
  2. ?>
复制代码

打开浏览器,查看http://localhost 或者 http://127.0.0.1 都可以。 php 服务器环境搭建配置(apache与iis两种方法) php服务器环境搭建方法 ubuntu下配置php服务器环境 php与mysql服务器配置说明 php获取服务器信息的类 php获取服务器端信息的另类方法 php获取服务器信息的一段代码



Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn