분류
php
AltoRouter - PHP5.3 + 라우팅 클래스. 가벼우면서도 매우 유연합니다.
본문
REST, 동적 및 역 라우팅을 지원합니다.
https://github.com/dannyvankooten/AltoRouter
$router = new AltoRouter(); // map homepage $router->map('GET', '/', function() { require __DIR__ . '/views/home.php'; }); // dynamic named route $router->map('GET|POST', '/users/[i:id]/', function($id) { $user = ..... require __DIR__ . '/views/user/details.php'; }, 'user-details'); // echo URL to user-details page for ID 5 echo $router->generate('user-details', ['id' => 5]); // Output: "/users/5"
- 이전글Stripe - 공식 Stripe PHP 라이브러리. 19.11.30
- 다음글Xdebug 및 VsCode로 PHP를 디버깅 하는 방법 알아보기 19.11.30