bored

A micro PHP framework
git clone git://git.bitsmanent.org/bored
Log | Files | Refs | README

commit dae0f26ebe5c9eb8057fba28a16fa34c9ec5de59
parent 36a1c08c02ef66ac4a35f816fc4d3baa787588ee
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Sat, 13 May 2017 22:58:35 +0200

Fix the routing sample.

Diffstat:
MREADME.md | 2+-
Mbored.php | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md @@ -9,7 +9,7 @@ include('bored.php'); bored_init(); -route('GET', '/hello/!name', function($name) { +route('GET', '/hello/!name', function($name = "Friend") { return "Hello ${name}"; }); diff --git a/bored.php b/bored.php @@ -86,8 +86,8 @@ function route($method, $route, $func = null) { return 0; } -function dbopen($host, $user, $pass, $dbname) { - if(!($r = @mysqli_connect($host, $user, $pass, $dbname))) +function dbopen($host, $user, $pass, $name) { + if(!($r = @mysqli_connect($host, $user, $pass, $name))) die('database error'); global $dblink; $dblink = $r;