PHP code example of elecena / nano

1. Go to this page and download the library: Download elecena/nano 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/ */

    

elecena / nano example snippets


RewriteEngine On

# static assets
RewriteRule \.(css|js|gif|png|jpg)$ static.php [L]

# API requests
RewriteRule \.(json|xml)$ api.php [L]

# URL - last (always redirect)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule (.*) index.php [L]