当前位置: 软件>php软件
PHP框架 MVCnPHP
本文导语: MVCnPHP 是一个PHP的轻量级、易学而且功能强大的MVC框架。 控制器示例代码: namespace MyFirstMVCnPHPApp;use AptenoMVCnPHP as MVC;require 'Apteno/MVCnPHP/Controller.php';$controllerConfig['default'] = array( 'dirs' => array('/path/to/commands/','/path/to/views/'), 'doC...
MVCnPHP 是一个PHP的轻量级、易学而且功能强大的MVC框架。
控制器示例代码:
namespace MyFirstMVCnPHPApp;
use AptenoMVCnPHP as MVC;
require 'Apteno/MVCnPHP/Controller.php';
$controllerConfig['default'] = array(
'dirs' => array('/path/to/commands/','/path/to/views/'),
'doCompileChecks' => true,
'showCompileLog' => true,
'forceCompile' => false,
'configFile' => '/path/to/writeable/directory/defaultControllerConfig.php'
);
$controllerConfig['admin'] = array(
'dirs' => array('/path/to/admin/commands/','/path/to/admin/views/'),
'doCompileChecks' => true,
'showCompileLog' => true,
'forceCompile' => false,
'configFile' => '/path/to/writeable/directory/adminControllerConfig.php'
);
$controller = new MVCController('http://www.example.com', $controllerConfig);