PHP code example of lonefirst / framework
1. Go to this page and download the library: Download lonefirst/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/ */
lonefirst / framework example snippets
$this->reg('name/:id', 'name@getNameById', ['get', 'head']);
// 当访问 yourdomain/name/:id 时将会调用 nameController 中的 getNameById(:id) 函数
$this->reg('say/:hi', function($hi) {echo $hi;});
// 当访问 yourdomain/say/hi 时会显示 'hi'