温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

TODO:macOS上ThinkPHP5和Semantic-UI集成

发布时间:2020-07-23 02:49:41 来源:网络 阅读:590 作者:OneTODO 栏目:web开发

TODO:macOS上ThinkPHP5和Semantic-UI集成

TODO:macOS上ThinkPHP5和Semantic-UI集成

1. 全局安装 (on OSX via homebrew)Composer 是 homebrew-php 项目的一部分

TODO:macOS上ThinkPHP5和Semantic-UI集成

2. 把Xcode升级到8.1后继续安装Composer

TODO:macOS上ThinkPHP5和Semantic-UI集成

3. 使用composer创建TP5项目MWL-Dispatch

composer create-project topthink/think MWL-Dispatch

TODO:macOS上ThinkPHP5和Semantic-UI集成

4. 配置apache,设置Virtual hosts,

在httpd.conf中找到“#Include /private/etc/apache2/extra/httpd-vhosts.conf”,去掉前面的“#”,并保存。

找到

<Directory />

AllowOverride none

Require all denied

</Directory>

改成

<Directory />

AllowOverride none

Require all granted

</Directory>

5. 对项目runtime文件夹设置写对权限

sudo chmod -R a+w ./runtime/

6. 在httpd-vhost.conf添加配置

<VirtualHost *:80>

DocumentRoot “/Users/wuyong/data/ludong/xcx/php/MWL-Dispatch/public”

ServerName mwl-dispatch.com

ErrorLog “/private/var/log/apache2/mwl-dispatch-error_log”

CustomLog “/private/var/log/apache2/mwl-dispatch-access_log” common

</VirtualHost>

7. 自动创建模块,把根目录的build.php拷贝到application下,然后在项目目录下运行php think build –module test,一定要在根目录下执行这个目录,不然会出现“Could not open input file: think”

8. 从GitHub下载Semantic-UI,把相应的css,js拷贝到public文件夹下,同时把googleapi的字体下载到本地,这样可以减少网站打开的加载速度,很多人决定Semantic慢也许就是因为要加载google字体导致的,也有建议把fonts.googleapis.com改成fonts.useso.com,个人感觉还是慢,还是没有本地的加载快。

本例的源码分享在GitHub(https://github.com/SomeTODO/MWL-Dispatch)上,会不断完善并且使用起来。


wxgzh:ludong86

TODO:macOS上ThinkPHP5和Semantic-UI集成


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI