# \[Solved\]Fatal error: Class 'Slim' not found in

**URL:** <https://discourse.slimframework.com/t/solved-fatal-error-class-slim-not-found-in/768>\
**Category:** Questions\
**Created:** [September 29, 2016, 10:17am UTC](https://discourse.slimframework.com/t/solved-fatal-error-class-slim-not-found-in/768 "2016-09-29T10:17:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abe\_Wayer](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Abe\_Wayer](https://discourse.slimframework.com/u/Abe_Wayer)\
**Post date:** [September 29, 2016, 10:17am UTC](https://discourse.slimframework.com/t/solved-fatal-error-class-slim-not-found-in/768/1 "2016-09-29T10:17:45Z")

</div>

I have 2 files:  
index.php and Slim.php  
I post to you the index.php:

require “./Slim.php”;  
Slim::registerAutoloader();  
$app = new Slim();  
$app-\>get(’/{foo}’, function () {  
echo “Foo!”;  
});  
$app-\>run();

I don’t understand why it turns me that class Slim doesn’t exist can you help me?

---

<div class="post-metadata">

**Author:** ![tflight](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/tflight/32/1205_2.png) [@tflight](https://discourse.slimframework.com/u/tflight)\
**Post date:** [September 29, 2016, 12:20pm UTC](https://discourse.slimframework.com/t/solved-fatal-error-class-slim-not-found-in/768/2 "2016-09-29T12:20:06Z")

</div>

Which version of Slim are you using and how did you install it?

---

<div class="post-metadata">

**Author:** ![Abe\_Wayer](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Abe\_Wayer](https://discourse.slimframework.com/u/Abe_Wayer)\
**Post date:** [September 30, 2016, 7:34am UTC](https://discourse.slimframework.com/t/solved-fatal-error-class-slim-not-found-in/768/3 "2016-09-30T07:34:21Z")

</div>

2.6.1  
But I’ve just put the Slim file on the server, I’ve got just the index.php and the Slim file on it…  
I’ve sourched how to install slim on a ftp server but I didn’t solve the question, so, I’m trying

---

<div class="post-metadata">

**Author:** ![Abe\_Wayer](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Abe\_Wayer](https://discourse.slimframework.com/u/Abe_Wayer)\
**Post date:** [September 30, 2016, 8:16am UTC](https://discourse.slimframework.com/t/solved-fatal-error-class-slim-not-found-in/768/4 "2016-09-30T08:16:35Z")

</div>

I’ve tried to download the Slim manually from [https://github.com/slimphp/Slim](https://github.com/slimphp/Slim) but there is not the slim file ☹

---

<div class="post-metadata">

**Author:** ![RikuS](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@RikuS](https://discourse.slimframework.com/u/RikuS)\
**Post date:** [September 30, 2016, 8:34am UTC](https://discourse.slimframework.com/t/solved-fatal-error-class-slim-not-found-in/768/5 "2016-09-30T08:34:06Z")

</div>

It you’re using v2.6.1, you need to select brach 2.x on Github, otherwise you’re downloading the newest version.

---

<div class="post-metadata">

**Author:** ![Abe\_Wayer](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@Abe\_Wayer](https://discourse.slimframework.com/u/Abe_Wayer)\
**Post date:** [September 30, 2016, 9:00am UTC](https://discourse.slimframework.com/t/solved-fatal-error-class-slim-not-found-in/768/6 "2016-09-30T09:00:19Z")

</div>

Solved thanks to all
