fork download
  1. <?php
  2.  
  3. use \Psr\Http\Message\ServerRequestInterface as Request;
  4. use \Psr\Http\Message\ResponseInterface as Response;
  5.  
  6. require 'vendor/autoload.php';
  7. require 'app/autoload.php';
  8.  
  9. $config['db']['host'] = "localhost";
  10. $config['db']['user'] = "root";
  11. $config['db']['pass'] = "";
  12. $config['db']['dbname'] = "test";
  13. $loader = new Twig_Loader_Filesystem('app/templates');
  14. $twig = new Twig_Environment($loader);
  15.  
  16. $app = new \Slim\App(['DBsettings' => $config]);
  17. $conteiner = $app->getContainer();
  18.  
  19. $app->get("/", function (Twig_Environment $twig) {
  20. echo $twig->render('index.php');
  21. });
  22. $app->get("/filelist", function() {
  23.  
  24. });
  25. $app->run();
  26.  
  27. // your code goes here
Runtime error #stdin #stdout #stderr 0.01s 52488KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Warning:  require(vendor/autoload.php): failed to open stream: No such file or directory in /home/xaDHUc/prog.php on line 6
PHP Fatal error:  require(): Failed opening required 'vendor/autoload.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/xaDHUc/prog.php on line 6