php mvc
1.0.0
次の機能を備えたPHP MVCフレームワーク:
アプリケーションフォルダーにサンプルアプリケーションがあります。すべてのWebリクエストをApplication/www/index.phpに渡すようにWebサーバーを構成します。 Apacheを使用している場合、付属の.htaccessファイルを使用できます。 PHP開発Webサーバーを介して実行するには、アプリケーション/WWWフォルダーに変更して実行します。
php -S 127.0.0.1:8080 cli-server-index.php
これにより、Webサーバー内に組み込まれたPHPで実行中にwwwから静的コンテンツを許可するCLI-Server-index.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はconfig.php ( config.php.sampleを参照)に配置する必要があります。これは、 $ local変数のconfigファイル内で使用できます。