fork download
  1. <?php
  2.  
  3. $app->post('/', function() use ($app) {
  4. $uploaddir = "uploads/";
  5. $temp = $_FILES['file']['name'];
  6.  
  7. $uploadfile = $uploaddir . $temp;
  8.  
  9. move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile);
  10.  
  11. $app->flash('message','Файл загружен!');
  12. $app->render('upload.tpl');
  13. });
Runtime error #stdin #stdout #stderr 0.01s 20568KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Notice:  Undefined variable: app in /home/noxAso/prog.php on line 3
PHP Fatal error:  Call to a member function post() on a non-object in /home/noxAso/prog.php on line 3