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變量中的配置文件中可用。