test-lin / yaf
The DIY yaf Framework.
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:project
Requires
- php: >=7.0
- ext-json: *
- ext-yaf: ^3.0
- psr/log: ^1.1.0
- topthink/think-cache: ^1.0
- topthink/think-log: ^1.0
- topthink/think-orm: ^1.2
- topthink/think-validate: ^1.0
This package is auto-updated.
Last update: 2025-02-23 20:03:53 UTC
README
环境要求
- php7.0+
- yaf
- yar
- composer
安装
composer create-project --prefer-dist test-lin/yaf blog
配置
1、nginx 站点
server {
listen 80;
root /var/www/yaf-framework/public;
server_name www.yaf.com;
index index.php;
charset utf-8;
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
error_log /var/log/nginx/yaf.log error;
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?$1 last;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
开发规范
- 基础规范 RSP-4
- 文件夹命名:全英文小写
- 类文件及类名命名:大驼峰
- 变量、类属性命名:小驼峰
- 常量命名:大写英文 + 下划线
- 类方法命名:小驼峰
- 函数命名:小写英文 + 下划线
- 无任何关联的函数全部放置在公共函数中