1

I followed the instruction on slim framework. Created a composer.json file in my directory

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

and run composer install file. I have the following directory structure now

enter image description here

As described in the documentation at slim framework i created an index.php file and require the vendor/autoload.php

But i am getting Class not found error.

Thanks

Raheel
  • 8,716
  • 9
  • 60
  • 102

1 Answers1

1

Try using namespaces when instantiating classes ... like so new \Slim\Slim();.

Martin Turjak
  • 20,896
  • 5
  • 56
  • 76
  • there was already index.php in vendor directory i deleted that and now its working fine. thanks – Raheel Jan 24 '15 at 17:41