janfish / phalcon-seed
Phalcon 框架。
dev-master
2021-02-24 13:46 UTC
Requires
- php: >=7.1.0
- ext-phalcon: >=3.4.1
- janfish/async-caller: ^1.1
- predis/predis: ^1.1
This package is not auto-updated.
Last update: 2024-10-03 07:37:31 UTC
README
目录结构说明
api 微应用模式例子 cli 脚本应用模式例子 configs 公用配置文件 logs 日志目录 core 核心程序
版本环境
PHP 版本 7.1.2 Phalcon 3.4.1
兼容性
PHP 版本 5.5.3 Phalcon 2.0.8
PHP 配置
php.ini
variables_order = "GPCSE"
系统环境配置
/etc/profile
export SITE_ENV=DEV
Nginx
虚拟主机
server {
listen 80;
server_name YOUR_LOCAL_DOMAIN;
root /vagrant/phalcon7/app/public;
include phalcon7.conf;
}
phalcon7.conf
index index.php;
try_files $uri $uri/ @rewrite;
location @rewrite {
rewrite ^(.*)$ /index.php?_url=$1;
}
location ~ index\.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_index /index.php;
fastcgi_pass 127.0.0.1:9007;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SITE_ENV DEV;
}
phalcon 工具
- 配置 configs 目录下的 config.ini,主要修改数据库配置和 Model 路径配置
- 在项目根目录下创建 .phalcon 目录
- 在根目录下运行 phalcon tools 生成模型等
phalcon model tableName --extends=BaseModel --doc
phalcon all-models --extends=BaseModel --doc
phalcon-ide-stubs
PHPUnit 环境
PHP5.5
wget https://phar.phpunit.de/phpunit-4.8.phar
chmod +x phpunit-6.2.phar
mv phpunit-6.2.phar /usr/local/bin/phpunit
PHP7.1
wget https://phar.phpunit.de/phpunit-6.2.phar
chmod +x phpunit-6.2.phar
mv phpunit-6.2.phar /usr/local/bin/phpunit
GRUNT 编译环境
NODEJS
- 安装 nodejs
- npm install -g grunt-cli
- npm config set registry https://registry.npm.taobao.org
- cd app/public
- npm install
编译命令
- grunt release
- grunt build_watch