I’m having a problem with this spl_autoload and a static method. The constructor in this class requires two params to function. I’m new to autoload and static classes so I’m out of my league a bit here. Hopefully someone can shed some light on this for me.
Here is the call:
if(captcha::validate($post))...
If I require the class apart from the spl_autoload function, it works as expected. If I let autoload handle it, as it should, the script dies with this message:
Fatal error: Class 'captcha' not found...
Can someone tell me what I am doing wrong here?
Here is the official manual of spl_autoload
Or try below function: