webrium/core
最新稳定版本:3.0.4
Composer 安装命令:
composer require webrium/core
包简介
PHP Framework
README 文档
README
Webrium Core
Webrium Core has a set of features that make site development simpler and faster. Core is used to develop the Webrium framework, but if needed, all or part of its features can be used in other projects. Webrium Core includes facilities such as routes, file upload and download, session management, etc
1) install Webrium Core
composer require webrium/core
2) Create the index.php file
index.php
<?php // Load Composer autoloader require_once __DIR__ . '/../vendor/autoload.php'; // Import required classes use Webrium\App; use Webrium\Debug; use Webrium\Route; // Enable error display for debugging Debug::enableErrorDisplay(true); // Disable error logging to file Debug::enableErrorLogging(false); // Set application root path App::setRootPath(__DIR__); // Define home route Route::get('/', function () { return ['message' => 'Hello World']; }); // Start routing Route::run();
3) Create the .htaccess file in app
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>
Try it now 🎉
统计信息
- 总下载量: 933
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 5
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-28