aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorwinter2024-12-06 20:43:26 +0000
committerwinter2024-12-06 20:43:26 +0000
commite1ad307b531c27ec6bfaf8b4d018991b0d4a78f3 (patch)
tree4ef08af2b4051d433bb929d5162474ac6777cab1 /index.php
initial commit
hardcoded functionality mostly!
Diffstat (limited to 'index.php')
-rw-r--r--index.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/index.php b/index.php
new file mode 100644
index 0000000..54f1043
--- /dev/null
+++ b/index.php
@@ -0,0 +1,17 @@
+<?php
+
+spl_autoload_register(function ($class) {
+ $file = str_replace('\\', DIRECTORY_SEPARATOR, $class) . '.php';
+ require $file;
+});
+
+function autoload_glob(string $pattern) {
+ foreach (glob($pattern) as $filename) {
+ require $filename;
+ }
+}
+
+autoload_glob('routes/*.php');
+autoload_glob('misc/*.php');
+
+WpfTest\Router::getInstance()->processRequest();