PHP code example of maketok / site

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

    

maketok / site example snippets



server {

    listen	80;
    listen	443 ssl;

    ssl_certificate /PATH/TO/CERTS/server.crt;
    ssl_certificate_key /PATH/TO/CERTS/server.key;

    server_name SERVER_NAME;

    index index.php index.html index.htm;
    set $root_path '/PATH/TO/MAKETOK/ROOT/public';
    root $root_path;

    try_files $uri $uri/ @rewrite;

    location /admin {
        rewrite ^/(.*)$ /admin/index.php?_url=/$1 last;
    }

    location @rewrite {
        rewrite ^/(.*)$ /index.php?_url=/$1;
    }

    location ~ \.php {
        fastcgi_pass unix:/var/run/php5-fpm.sock;
        fastcgi_index /index.php;
        fastcgi_read_timeout 86400;