PHP code example of g3yuri / volt-php

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

    

g3yuri / volt-php example snippets


./vendor/bin/phpunit tests

    public static function lastModified($path)  {
        return self::driver()->lastModified($path);
    }

        if (array_key_exists('HTTP_ORIGIN', $_SERVER)) {
            $origin = $_SERVER['HTTP_ORIGIN'];
        } else if (array_key_exists('HTTP_REFERER', $_SERVER)) {
            $origin = $_SERVER['HTTP_REFERER'];
        } else {
            $origin = $_SERVER['REMOTE_ADDR'];
        }

    public static function write($path, $content) {
        $fs = self::driver();
        $fs->write($path, $content);
    }
bash
php -c ~/php.ini /usr/bin/composer install
bash
    index index.php;
    root /www/wwwroot/slim.gmi.gd.pe/public;
    location / {
          try_files $uri $uri/ /index.php?$args;
    }