对比网络上各种集成环境之后,选择wampserver集成开发环境
-
安装过程遇到的问题:
- 右下角标为橘色而非橙色
解决方法: 端口冲突,将80端口改为了88端口,使用的是如下博客链接中的方案 https://blog.csdn.net/AndyNikolas/article/details/71248682
- 右下角标为橘色而非橙色
-
准备在mac上搭建对应的环境,遇到很多问题
- 浏览器访问服务器上.php文件不解析直接下载(悬而未决)
-
两个关键的配置文件
- apache的配置文件:/private/etc/apache2/httpd.conf
- php的配置文件:/private/etc/php.ini
- 网站根目录:/Library/WebServer
找半天找不到解决方案
下面是来自brew php的提示内容
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php7_module /usr/local/opt/php/lib/httpd/modules/libphp7.so
<FilesMatch .php$>
SetHandler application/x-httpd-php
</FilesMatch>
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini and php-fpm.ini file can be found in:
/usr/local/etc/php/7.2/
To have launchd start php now and restart at login:
brew services start php
Or, if you don't want/need a background service you can just run:
php-fpm