I can use a class with include and use but I failed with spl_autoload_register. I tried different methods without success. What’s work fine: or But the code below failed: or Answer The problem was that use needs backslash for the spacename and include needs slash for the path of the file.php where I have the classes. I’m on MacOS X
Tag: spl-autoload-register
Why is my autoloader loading every class in my wp install?
Ive been working on a wordpress plugin and Ive had to extend a class in another file, something I’ve not done before. So this has got me into using an autoloader. To give you some idea of my folder …