wuding/php-app

There is no license information available for the latest version (21.1.20) of this package.

skeleton application for php framework

Installs: 25

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 1

Forks: 0

Open Issues: 0

Type:framework

21.1.20 2021-01-20 08:49 UTC

This package is auto-updated.

Last update: 2024-03-30 00:19:12 UTC


README

目录结构

app 应用目录

example

src 源文件目录

vendor

web 文档根目录

安装

环境需求

PHP >= 5.4

扩展
文件 应用模块 控制器 动作方法
mbstring web/index.php
fileinfo web/index.php
pdo_mysql search Index index
openssl Metowolf\Meting::netease_AESCBC()
curl 同上

安装命令

composer create-project wuding/php-app=dev-master

# 或者下载 zip 解压后安装
composer install

配置

app/config.php

'database_contect' => 'database',
'database' => array(
    'db_name' => '',
    'username' => '',
    'password' => '',
),
'template' => array(
    'output_callback' => null, // false 使用默认 null 不使用任何
),
// 需要用到的自定义函数
'func' => [
    'config' => [],
    'load' => ['arr'],
],
'downloadDir' => 'N:\Server\Download',

内建服务器

默认索引文件名

优先级 文件名 命令行示例
0 router.php php -S 0.0.0.0:80 E:\env\www\work\wuding\php-app\web\router.php
1 index.php php -S 0.0.0.0:80 -t E:\env\www\work\wuding\php-app\web
2 index.html php -S localhost:8080

存在的目录和文件

/favicon.ico

/index.html

/index.php 全静态服务器配置时无

/router.php

/img/

/img/index.html

/img/screenshot.png

存在的模块和控制器

/back

/back/end

测试结果

描述 地址 router.php index.php index.html
根目录 / 200 200 200
图标 /favicon[.ico|png] 404,200,404 404,200,400 .html,200,400
首页 /index[.html|htm|php] 200 200,200,400,200 .html,200,400,400
路由 /router[.php|html] 404 404,404,400 .html,200,400
文件夹 /img[/|/index.html] 200 index index
图片 /img/screenshot[/|.png] 404,404,200 index,index,200 index,index,200
模块 /back[/|.php] 200 200,200,404 .html,.html,400
控制器 /back/end[/|.php] 200 200,200,404 .html,.html,400
总结 默认不支持列出
文件和目录
路由名称的
模块不存在,
可忽略扩展名
路由名称的
模块不存在,
不可忽略扩展名
无点且不存
在的入口文件接管

状态说明

状态 说明
200 成功
400 默认错误页
404 自定义错误页
index 默认目录索引页
.html 输出 index.html

流程

选项配置

.user.ini

set_time_limit(1);

请求资源

静态匹配,文件未检测到或直接返回

忽略扩展名(Web 动态资源)

首页

目录

文件

末端文件检测和包含