PHP 生成UUID
    public static function  uuid_gen()
    {
        $chars = md5(uniqid(mt_rand(), true));
        $uuid = substr($chars, 0, 8) . '-'
            . substr($chars, 8, 4) . '-'
            . substr($chars, 12, 4) . '-'
            . substr($chars, 16, 4) . '-'
            . substr($chars, 20, 12);
        return $uuid;
    }
PHP 生成MAC地址
    /**
     * 生成MAC
     */
    public static function mac_gen()
    {
        $array = array(
            mt_rand(0x00, 0x7f),
            mt_rand(0x00, 0x7f),
            mt_rand(0x00, 0x7f),
            mt_rand(0x00, 0x7f),
            mt_rand(0x00, 0xff),
            mt_rand(0x00, 0xff)
        );
        return join(':', array_map(function ($v) {
            return sprintf("%02X", $v);
        }, $array));
    }
Laravel Nginx 伪静态

Nginx 伪静态

server{
        #端口配置
        listen 80;
        #域名配置
        server_name laravel.cc;
        index index.php index.html index.htm;
        #站点配置到public
        root /data/wwwroot/laravel.cc/public;
      #日志记录
        access_log /data/logs/nginx.laravel.cc.log access;
        error_log /data/logs/nginx.laravel.cc.error debug;
     #静态文件配置
        location ~ .*\.(jpg|jpeg|gif|png|bmp|css|js|swf|txt|ttf|woff|ico)$ {
                expires 7d;
                break;
        }
        location / {
         #重点区
                try_files \$uri \$uri/ /index.php?$query_string;
                index index.php index.html index.htm;
        }
        #静态文件配置
        location /logs {
                autoindex on;
                autoindex_exact_size off;
                autoindex_localtime on;
                break;
        }
        #处理php配置
        location ~ "\.php$" {
                include fastcgi_params;
                fastcgi_index index.php;
                #在nginx.conf配置server_mango
                fastcgi_pass server_mango;
        }
}