liziyu 发布的文章

qx.JPG

  • 通过角色获取到用户 Roles-UserRoles-Users
  • 通过角色获取到导航菜单 Roles-NavigationRoles-Navigations
  • 通过角色获取到部门以及部门用户 Roles-RoleGroup-Groups-UserGroup-Users
  • 通过角色获取到授权应用 Roles-RoleApp

这个算是比较经典的了,需要的可能参考。

server
{
    listen 80;
    server_name xxx.webman.xxx;
    
    index index.html;
    root /server/webman/public;
    
    location / {
        proxy_http_version 1.1;
        proxy_set_header Connection "keep-alive";
        proxy_set_header Host $http_host;
        
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-Scheme $scheme;
        
        if ($uri = /) {
            proxy_pass http://127.0.0.1:8787;
            break;
        }
        
        if (!-e $request_filename) {
            proxy_pass http://127.0.0.1:8787;
        }
    }
    
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|js|css)$
    {
        expires      30d;
        error_log /dev/null;
        access_log /dev/null;
    }
    
    access_log    /dev/null;
    error_log    /server/logs/webman.error.log;
}

class AccessControl implements MiddlewareInterface
{
    /**
     * @param Request $request
     * @param callable $next
     * @return Response
     */
    public function process(Request $request, callable $next) : Response
    {
        $response = $request->method() == 'OPTIONS' ? response('') : $next($request);
        $response->withHeaders([
            'Access-Control-Allow-Origin' => '*',
            'Access-Control-Allow-Credentials' => 'true',
            'Access-Control-Allow-Headers' => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With,Origin',
            'Access-Control-Allow-Methods' => 'GET,POST,PUT,DELETE,OPTIONS',
        ]);
        return $response;
    }
}


NAPS2开源免费

  • 可以将多个文档、图片、pdf合并成一个pdf文档。
  • 目前只支持windowlinux系统。
  • 支持多国语言。
  • 界面清洁,无广告。
  • 特别轻量,严重推荐。

naps2-screen-desktop.jpg

https://www.naps2.com/

# Virtual hosts
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

<VirtualHost *:80>
    DocumentRoot "/Users/liziyu/website/xfcms_base/public"
    ServerName xfcms-base.local
    Options Indexes FollowSymLinks
    <Directory />
        AllowOverride All
        Order Deny,Allow
        Deny from all
        Allow from 127.0.0.1
    </Directory>
</VirtualHost>


PKprimary key 主键
NNnot null 非空
UQunique 唯一索引
BINbinary 二进制数据(比text更大的二进制数据)
UNunsigned 无符号 整数(非负数)
ZFzero fill 填充0 例如字段内容是1 int(4), 则内容显示为0001
AIauto increment 自增
Ggenerated column 生成列

在mysql查询语句中加\g、\G的意思:

\g 的作用是分号和在sql语句中写“;”是等效的
\G 的作用是将查到的结构旋转90度变成纵向(换行打印)

1位=1比特;

1字节=8位;

1字=2字节;

1字=16位。

1、位

位是计算机存储的最小单位,简记为b,也称为比特(bit)计算机中用二进制中的0和1来表示数据,一个0或1就代表一位。位数通常指计算机中一次能处理的数据大小;

2、比特

比特(bit)是由英文BIT音译而来,比特同时也是二进制数字中的位,是信息量的度量单位,为信息量的最小单位;

3、字节

字节,英文Byte,是计算机用于计量存储容量的一种计量单位,通常情况下一字节等于八位,字节同时也在一些计算机编程语言中表示数据类型和语言字符,在现代计算机中,一个字节等于八位;

4、字

字是表示计算机自然数据单位的术语,在某个特定计算机中,字是其用来一次性处理事务的一个固定长度的位(bit)组,在现代计算机中,一个字等于两个字节。