statescua/plaut
Composer 安装命令:
composer require statescua/plaut
包简介
A lightweight MVC framework for newbies that use LAMP stack
README 文档
README
Lightweight Model-View-Controller Micro PHP Framwork built for newbies who use a LAMP stack. Replit: https://plaut.thinkphp.repl.co/
Install
- composer create-project --prefer-dist statescua/plaut php-mvc
- cd php-mvc
- php -S 0.0.0.0:8080
- Then go to browser: http://localhost:8080
Requirements
- PHP 7.0 or greater
- MySQL 4.1.2 or greater
- The mod_rewrite Apache module
MOD_REWRITE Apache2
In order for Apache to understand rewrite rules, we first need to activate mod_rewrite. It’s already installed, but it’s disabled on a default Apache installation. Use the a2enmod command to enable the module.
sudo a2enmod rewrite
sudo nano /etc/apache2/sites-available/000-default.conf
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
sudo systemctl restart apache2
sudo nano /var/www/html/.htaccess
.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
# Prevent file browsing
Options -Indexes
Proof:
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-21