Slim class not found when installing thin composers

I followed the instructions for the slim framework. Created composer.json file in my directory

{ "require": { "slim/slim": "2.*" } } 

and run the composer setup file. Now I have the following directory structure

enter image description here

As described in the documentation in the slim framework, I created an index.php file and require that the /autoload.php provider

But I get Class not found error.

thanks

+1
php composer-php slim
source share
1 answer

Try using namespaces when creating class instances ... for example new \Slim\Slim(); .

+1
source share

All Articles