美文网首页
Windows10下搭建PHP环境

Windows10下搭建PHP环境

作者: 雪_豹 | 来源:发表于2018-08-26 19:21 被阅读0次
    软件
    Visual C++ Redistributable for Visual Studio 2015
    php-5.6.29-Win32-VC11-x64.zip
    httpd-2.4.23-win64-VC14.zip
    mysql-5.5.54-winx64.zip
    
    PHP配置

    D:\Program Files (x86)\php-5.6.29-Win32-VC11-x64D:\Program Files (x86)\php-5.6.29-Win32-VC11-x64\ext加入到环境变量PATH

    配置Apache

    编辑D:\Program Files (x86)\Apache24\conf\httpd.conf

    修改ServerRoot "C:\Apache24" => ServerRoot "D:\Program Files (x86)\Apache24"

    修改#ServerAdmin admin@example.com=>ServerAdmin admin@example.com

    修改DocumentRoot "C:\Apache24\htdocs"=>DocumentRoot "D:\Program Files (x86)\Apache24\htdocs"

    修改<Directory "C:\Apache24\htdocs">=><Directory "D:\Program Files (x86)\Apache24\htdocs">

    查找DirectoryIndex index.html,修改为DirectoryIndex index.html index.php index.htm(这里我们添加了index.php index.htm)

    修改ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"=>ScriptAlias /cgi-bin/ "D:\Program Files (x86)\Apache24\cgi-bin"

    修改<Directory "c:/Apache24/cgi-bin">=><Directory "D:\Program Files (x86)\Apache24\cgi-bin">

    最后一行加添LoadModule php5_module "D:\Program Files (x86)\php-5.6.29-Win32-VC11-x64\php5apache2_4.dll",AddType application/x-httpd-php .php .html .htm,PHPIniDir "D:\Program Files (x86)\php-5.6.29-Win32-VC11-x64"

    将apache安装到系统服务中

    cmd运行D:\Program Files (x86)\Apache24\bin\httpd -k install把apache安装到系统服务中去

    PhpStorm-2016.3.1激活

    http://www.cnblogs.com/ys-wuhan/p/5840305.html
    选择 License server
    http://idea.imsxm.com/

    开发项目配置

    修改D:\Program Files (x86)\Apache24\conf\httpd.conf中的DocumentRoot "D:\Program Files (x86)\Apache24\htdocs"<Directory "D:\Program Files (x86)\Apache24\htdocs">把路径指向项目工作目录,如:DocumentRoot "E:\workspace\pc\test"

    相关文章

      网友评论

          本文标题:Windows10下搭建PHP环境

          本文链接:https://www.haomeiwen.com/subject/poaoiftx.html