gaucho/phpnext

A PHP routing system for Next.js static HTML without any Node.js in back-end

v0.2.1 2023-01-29 20:55 UTC

This package is auto-updated.

Last update: 2024-10-29 06:47:00 UTC


README

A PHP routing system for Next.js static HTML without any Node.js in back-end

Installation

composer require gaucho/phpnext

.htaccess

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

Use

<?php
require 'vendor/autoload.php';

use gaucho\PHPNext;

$outDir=realpath(__DIR__.'/out');
$pn=new PHPNext($outDir);
$pn->print();