Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A micro-framework for PHP built on ReactPHP, heavily inspired by Express.js
PHP
tree: c5c3e8ce15

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
README.md

README.md

Phluid

A microframework for PHP.

Example

Download phluid-php to a server somewhere.

<?php

require 'path/to/lib/Phluid.php';

$app = new Phluid_App();

$app->get( '/', function( $request, $response ){
  $response->renderText( 'Hello World' );
});

$app->get( '/hello/:name', function( $request, $response ){
  $response->renderText( "Hello {$request->param('name')}");
});

Save that to index.php and put it on a webserver somewhere and have it serve all file requests with an .htaccess like this one.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)?$ index.php [L]
Something went wrong with that request. Please try again.