(original) (raw)

import dgi.Api; import dgi.plates.Api; import dbi.mysql.all; void main () { try { MysqlDatabase db = new MysqlDatabase(); db.connect("dbname=rr", "test", "test"); dgi_begin(); const char [] html = import("db_example.html"); const char [] code = plateFile(html); mixin(code); dgi_end(); } catch ( Exception e ) { redirect("error.exe?msg=" ~ urlencode(e.toUtf8() ) ); } }