0、代码
https://github.com/luyangsiyi/thinkadmin
1、项目介绍
前台框架:layui
后台框架:ThinkPHP5.1
数据库:MySQL(可视化程序:MySQLWorkbench)
操作系统:MacOS
IDE:PhpStrom
实现功能:后台搭建
2、mac环境配置
因为需要验证码,mac自带的php缺少freetype,故需要重新配置。
(强烈建议重新配置!!)
brew update
brew search php
brew install php@7.2 //我安装的是7.2版本
(1)配置php路径
sudo vim ~/.bash_profile
添加如下内容:
export PATH=/usr/local/etc/php/7.2/bin:$PATH
更新:
source ~/.bash_profile
(2)启动apache
sudo apachectl start
apache默认启动路径为/Library/WebServer/Documents
,可以在/private/etc/apache2/httpd.conf
中配置DocumentRoot
,我没有修改,故之后直接把项目放到启动路径下即可。
(3)在apache中配置ph