WNMP phpStorm开发运行调试配置

1、 PHP下载  http://windows.php.net/download/

 解压到目录 修改配置文件php.ini

extension_dir = "./ext" 扩展目录

cgi.fix_pathinfo=1设置在cgi模式下PHP是否提供PATH_INFO信息。

extension=php_mysql.dll  mysql连接

其他配置看具体情况,默认不用更改

调试插件 xdebug配置

https://xdebug.org/download.php 下载 【注意版本一定要对应】 【phpinfo可以查看】


[xdebug]  
zend_extension="D:\PHP5.6\ext\php_xdebug-2.5.5-5.6-vc11-x86_64.dll"  
xdebug.remote_enable = On  
xdebug.remote_handler = dbgp     
xdebug.remote_host= localhost  
xdebug.remote_mode = req
xdebug.remote_port = 9001  
xdebug.idekey = PHPSTORM
xdebug.remote_log = D:\PHP5.6\xdebug.log 

配置环境变量 D:\PHP5.6;D:\PHP5.6\ext;

启动php-cgi:D:\PHP5.6\php-cgi.exe -b 127.0.0.1:9000 -c D:\PHP5.6\php.ini

2、 Nginx 下载 http://nginx.org/en/download.html

 解压到目录

配置文件 \conf\nginx.conf

#user  nobody;
worker_processes  1;

# 打开log
error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

  

    # 打开log
    access_log  logs/access.log;

    sendfile        on;
    keepalive_timeout  65;
    server {
        listen       8080;
        server_name  localhost;
        # 打开log
        access_log  logs/host.access.log;

        location / {
            root   E:/wwwdsccom;
            index  index.html index.htm index.php;
        }
        error_page  404              /404.html;
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        # 配置FastCGI,PHP 脚本请求全部转发到 FastCGI处理
        location ~ \.php$ {
            root           E:/wwwdsccom;
            # 设置监听端口
            fastcgi_pass   127.0.0.1:9000;
            # 设置nginx的默认首页文件(上面已经设置过了,可以删除)
            fastcgi_index  index.php;
            # 设置脚本文件请求的路径
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            # 引入fastcgi的配置文件
            include        fastcgi_params;
        }
        location ~ /\.ht {
            deny  all;
        }
    }

}
 

你可能感兴趣的:(电脑配置)