webrium / core
PHP 框架
2.1.4
2024-08-02 06:39 UTC
Requires
- php: ^8
Requires (Dev)
- phpunit/phpunit: ^9.6
- dev-master
- 2.1.4
- 2.1.3
- 2.1.2
- 2.1.1
- 2.1.0
- 2.0.9
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0-beta-2
- 2.0.0-beta
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 0.2.8
- 0.2.7
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.1
- 0.0.56
- 0.0.55
- 0.0.51
- 0.0.50
- 0.0.49
- 0.0.48
- 0.0.47
- 0.0.46
- 0.0.45
- 0.0.44
- 0.0.43
- 0.0.42
- 0.0.41
- 0.0.40
- 0.0.39
- 0.0.38
- 0.0.36
- 0.0.35
- 0.0.34
- 0.0.32
- 0.0.28
- 0.0.26
- 0.0.24
- 0.0.22
- 0.0.20
- 0.0.18
- 0.0.17
- 0.0.16
- 0.0.14
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.8
- 0.0.7
- 0.0.5
- 0.0.4
- 0.0.3
- 0.0.2
- 0.0.1
- dev-update027v
- dev-Add-Header-Class
- dev-improve-form-validation
- dev-beta
- dev-new_cache_development
This package is auto-updated.
Last update: 2024-09-15 14:28:33 UTC
README
Webrium Core
Webrium Core 提供了一系列功能,使得网站开发更加简单和快速。Core 用于开发 Webrium 框架,但如需,其所有或部分功能也可以在其他项目中使用。Webrium Core 包括路由、文件上传和下载、会话管理等设施。
文档
- 安装核心
composer require webrium/core
-
创建应用目录
-
在应用中创建 index.php 文件
index.php
<?php require_once __DIR__ . '/../vendor/autoload.php'; use Webrium\App; use Webrium\Debug; use Webrium\Route; Debug::showErrorsStatus(true); Debug::writErrorsStatus(false); // init index path App::root(__DIR__); Route::get('', function () { return ['message'=>'successful']; });
- 在应用中创建 .htaccess 文件
.htaccess
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
现在尝试
输出 (https:///app/)
{"message":"successful"}