Added class autoload capability.
authorLadislav Láska <laska@kam.mff.cuni.cz>
Sun, 17 Apr 2011 13:19:17 +0000 (15:19 +0200)
committerLadislav Láska <laska@kam.mff.cuni.cz>
Sun, 17 Apr 2011 13:19:17 +0000 (15:19 +0200)
classes/autoload.php [new file with mode: 0644]
index.php

diff --git a/classes/autoload.php b/classes/autoload.php
new file mode 100644 (file)
index 0000000..014ef81
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+function __autoload($class_name) {
+    include strtolower($class_name).'.php';
+}
+?>
index 2bddafb358ab107db89f103edbd7787ba0494a1a..506f1fd7269d9275bf297375b80e20c60a1ff6eb 100644 (file)
--- a/index.php
+++ b/index.php
@@ -5,6 +5,8 @@ require_once "config.php";
 require_once "database.php";
 require_once "auth.php";
 require_once "href.php";
+require_once "autoload.php";
+require_once "msgbox.php";
 
 $auth = new Auth();
 $auth->login(); /* Handle login thru session, if possible */