程序员

PHP学习一:环境搭建

2017-09-21  本文已影响10人  cf87744ea7b3

PHP环境配置

一、下载安装XAMPP

https://www.apachefriends.org/download.html

二、修改Apache代码路径

XAMPP/etc/httpd.conf
修改对应下面两个指向代码index.php路径
DocumentRoot "/Users/hevin/ddz_server/trunk/src/server"
<Directory "/Users/hevin/ddz_server/trunk/src/server">

三、安装PHP的Redis扩展

1.git clone -b php7 https://github.com/phpredis/phpredis.git
2.cd phpredis
3./Applications/XAMPP/xamppfiles/bin/phpize --with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config
如果提示:Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
需要安装autoconf,方法:1.安装homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.brew install autoconf
4../configure -with-php-config=/Applications/XAMPP/xamppfiles/bin/php-config

  1. XAMPP/etc/php.ini 添加extension="redis.so"
上一篇 下一篇

猜你喜欢

热点阅读