PHP code example of mayron1806 / express_php
1. Go to this page and download the library: Download mayron1806/express_php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mayron1806 / express_php example snippets
namespace MyApp\Controllers;
class IndexController{
public function index(){
echo "Olá mundo!";
}
}
xpressPHP\Express\Express;
$app = new Express("MyApp\\Controllers\\");
$app->addRoute(route: "/", controller: "IndexController", action: "index",is_default_route: true);
$app->listen();
composer