Hi I am new in slim framework and using Slim framework in backend and using AngularJS in client, when load data from server this following error show:
Fatal error: require(): Failed opening required 'Slim/slim.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ngelgir0/public_html/api/index.php on line 3
Here is my folder structure:
public_html/
- api
+ Slim
index.php
.htaccess
And here is the first few lines in index.php
:
<?php
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$app = new Slim();
// endpoints related with FeedbackFormsResource
$app->get('/feedbacks', 'getFeedbackForms');
$app->get('/feedbacks/:id', 'getFeedbackFormsById');
$app->get('/feedbacks/search/:query', 'findFeedbackForm');
$app->post('/feedbacks/', 'addFeedbackForm');
$app->put('/feedbacks/:id', 'updateFeedbackForm');
$app->delete('/feedbacks/:id', 'deleteFeedbackForm');
And this is what I have for .htaccess
file:
RewriteEngine On
RewriteBase /api/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]