Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function autoloader($className) {
- $fileName = str_replace('\\', '/', $className) . '.php';
- //Try anove with only one backslash and note error code. Research this.
- $file = __DIR__ . '/../classes/' . $fileName;
- include $file;
- }
- spl_autoload_register('autoloader'); // Why is there a string here? Will it still work if I change it? How does this work?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement