PHP code example of wj008 / beacon-web

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

    

wj008 / beacon-web example snippets


server {
        listen       8082;
        server_name  localhost;
        location / {
            root   /cygdrive/e/works/php/beacon/www;
            index  index.html index.htm index.php;
			      if (!-e $request_filename){
				      rewrite ^(.*)$ /index.php$1 last;
			      }
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
        location ~ \.php(/.+)?$ {
            root           /cygdrive/e/works/php/beacon/www;
            set $path_info "";
            set $real_script_name $fastcgi_script_name;
            if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
                set $real_script_name $1;
                set $path_info $2;
            }
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
			      fastcgi_param SCRIPT_FILENAME /cygdrive/e/works/php/beacon/www$real_script_name;
            fastcgi_param SCRIPT_NAME $real_script_name;
            fastcgi_param PATH_INFO $path_info;