I try silex for building my application. When I try to test my first application, I get an error like this:
Fatal error: Class 'Silex' not found in /opt/local/apache2/htdocs/silex/try.php on line 5
and this is my code :
<?php
#require_once __DIR__.'/silex.phar';
require_once 'phar://'.__DIR__.'/silex.phar/vendor/.composer/autoload.php';
#require_once 'phar://'.__DIR__.'/silex.phar/autoload.php';
$app= new Silex/Application();
$app->get('hello/{name}',function($name) use($app){
return 'Hello ' .$app->escape($name);
});
$app['debug'] == true;
$app->run();
?>
I've searched for my error in a search engine and I have some suggestions like to add this code in php.ini:
extension=phar.so
phar.readonly = Off
phar.require_hash = Off
detect_unicode = Off
But I still get the same error when I test in a web browser. What's your suggestion?