bramus / router

A lightweight and simple object oriented PHP Router

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

um... controller blank page

Tokyo-Lei opened this issue · comments

tool : php8 \ nginx1.15.x
code:-----------------------------
LoginController.php:


namespace App\Controllers;

class Login{

  public  function index(){
        echo 'no';
    }
}

router.php:

<?php
use Bramus\Router\Router;

$router = new Router() ;
$router->setNamespace('Api\Controllers');
$router->get('/','Login@index');

print_r($router);
$router->run();

this no work ,
There is a blank after running, is it because of PHP8 incompatibility?