1. Go to this page and download the library: Download lisijie/framework library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
lisijie / framework example snippets
\App::config()->get('app', 'varname', 'default');
namespace App\Command;
use Core\Command;
class DemoCommand extends Command
{
public function testAction($name)
{
$this->stdout("hello, {$name}\n");
}
}
namespace App\Controller;
class MainController extends Controller
{
public function init()
{
// 初始化方法
}
public function indexAction()
{
$this->assign('foo', 'bar');
return $this->render();
}
}
bash
php index.php 路由地址 参数1 参数2...
Bash
[demo@localhost public]$ php index.php demo/test world
hello, world
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.