allora, ho strutturato la cosa in maniera diversa.
dentro la root ho messo una directory service2 con questo dentro:
codice:
banca 
 |_index.php
libs 
 |_Slim 
 |_ |_App.php
 |_SplClassLoader.php
dentro index.php ho messo questo:
Codice PHP:
require_once '../libs/SplClassLoader.php';

$loader = new SplClassLoader('Slim''/Slim');
$loader->register();
$app = new Slim\App();

$app->get('/', function ($request$response$args) {
    
$response->write("Welcome to Slim!");
    return 
$response;
});

$app->get('/hello[/{name}]', function ($request$response$args) {
    
$response->write("Hello, " $args['name']);
    return 
$response;
})->
setArgument('name''World!');

$app->run(); 
ma continuo ad ottenere errori:
codice:
Warning:  require(/Slim/Slim/App.php): failed to open stream: No such file or directory in /service2/libs/SplClassLoader.php on line 142

Warning:  require(/Slim/Slim/App.php): failed to open stream: No such file or directory in /service2/libs/SplClassLoader.php on line 142

Fatal error:  require(): Failed opening required '/Slim/Slim/App.php' (include_path='.:/php5.5/lib/php/') in /service2/libs/SplClassLoader.php on line 142