php mvc
1.0.0
具有以下功能的PHP MVC框架:
应用程序文件夹中有一个示例应用程序。将您的Web服务器配置为将所有Web请求传递到应用程序/www/index.php 。如果您使用的是Apache,则可以使用随附的.htaccess文件。要通过PHP开发Web服务器运行,请更改为应用程序/www文件夹并运行:
php -S 127.0.0.1:8080 cli-server-index.php
这将通过cli-server-index.php文件传递所有请求,该文件将允许在WWP内置的Web服务器内置的PHP时允许静态内容。
要运行CLI命令,请使用PHP CLI执行index.php文件:
php index.php
PHP-MVC Test Application [v0.0.1]
Available commands:
repl - Start interactive shell
create-users-table - Create users table
create-test-table - Create test table
dump-config - Dump configuration of specified type
show-test-records - Show records in the test table
no_method - Test missing method
no_controller - Test missing controller
要创建一个新的应用程序,请将框架/模板文件夹复制到根目录(在应用程序为)中并相应地重命名。将应用程序配置添加到配置文件夹中。应将特定于环境的配置放入config.php中(请参阅config.php.sample ),这将在$ local变量中的配置文件中可用。