PHP code example of binarykitten / zeffmu
1. Go to this page and download the library: Download binarykitten/zeffmu 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/ */
binarykitten / zeffmu example snippets
chdir(dirname(__DIR__));
app
->route('/', function() {
return '<a href="/hello">HEllo!</a>';
})
->route('/hello', function() {
return 'Hi!';
})
->route('/hello/:name', function($params) use ($app) {
return 'Hello ' . $params['name'];
})
->route('/hello/:name/:surname', function($params) use ($app) {
return 'Hello, Mr. ' . $params['surname'] . ', or shall I call you ' . $params['name'] . '?';
})
->run();