<IfModule dir_module> DirectoryIndex index.php index.html index.htm </IfModule>#load php module LOadModule php7_module "E:/Php7/php7apache2_4.dll" AddHandler application/x-httpd-php .php #指定php.ini的位置(注意:需要把E:/Php7下的php.ini-development 重命名为 php.ini) PHPIniDir "E:/Php7"# 查找占用80端口的进程pid netstat -ano|find ":80" # 假设该进程pid为2013,查看进程名称: tasklist /fi "pid eq 2013" # 杀掉该进程命令 taskkill /f /pid 2013<html> <head> <title>Test PHP5</title> </head> <body> <center> <h1>This is test information</h1> </center> <hr> <?php phpinfo(); ?> </body> </html>extension=php_mysql.如下:
3.3. 配置php7的环境变量 (可以 略过 )
顺便配置环境变量方便以后的pear安装,不然dos窗口下操作还要先找到安装目录:
① 右击我的电脑-属性-高级-环境变量
②找到 Path 这一项,在最后加入你的 PHP 目录和类库所在的路径,包括前面的“;”(例如: ;E:\Php7;E:\Php7\ext )
③点击系统变量的“新建”按钮并在“变量名”中输入“PHPRC”,在“变量值”中输入 php.ini 文件所在的目录(例如: E:\Php7 ) ,这个步骤是为了让windows找到php.ini.
以上就是win7下搭建PHP环境的方法详解的详细内容!
查看更多关于win7下搭建PHP环境的方法详解的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did54318
win7下搭建PHP环境的方法详解
阅读:45次