Make test.php work without external help
This commit is contained in:
parent
6a4b00086b
commit
f6b49ba451
17
test.php
17
test.php
@ -1,4 +1,21 @@
|
||||
<?php
|
||||
// Increase verbosity
|
||||
error_reporting(E_ALL);
|
||||
ini_set("display_errors",1);
|
||||
|
||||
// All notices and warnings shall be fatal
|
||||
set_error_handler("onError");
|
||||
function onError($severity, $message, $file, $line) {
|
||||
throw new ErrorException($message, 0, $severity, $file, $line);
|
||||
}
|
||||
|
||||
// Autoload classes if available
|
||||
spl_autoload_register(function ($class_name) {
|
||||
include(str_replace('Post\\','',$class_name).'.php');
|
||||
});
|
||||
|
||||
session_start();
|
||||
|
||||
$form = new Post\Form(array(
|
||||
"string" => new Post\FormField(),
|
||||
"secret" => new Post\SecretFormField(),
|
||||
|
Loading…
Reference in New Issue
Block a user