Created
          May 18, 2011 10:52 
        
      - 
      
 - 
        
Save heavenshell/978358 to your computer and use it in GitHub Desktop.  
    Silex error
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| require_once 'silex.phar'; | |
| $app = new Silex\Application(); | |
| $app->get('/', function () { | |
| return 'index'; | |
| }); | |
| $app->get('/hello/{name}', function ($name = 'bar') { | |
| return "Hello $name"; | |
| }); | |
| $app->run(); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $ curl http://localhost/silex.php/hello/ | |
| Fatal error: Uncaught exception 'Symfony\Component\Routing\Matcher\Exception\NotFoundException' in phar:///tmp/silex.phar/src/Silex/Application.php on line 167 | |
| Symfony\Component\Routing\Matcher\Exception\NotFoundException: in phar:///tmp/silex.phar/vendor/Symfony/Component/Routing/Matcher/UrlMatcher.php on line 33 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment