API设计资料整理

 

接口认证

OAuth 2.0 [oauth-php]

自定服务与客户端相同算法认证

        // 签名认证 
            $signature = $this->request ( "signature" ); // app端生成的签名
            $token = $this->request ( "token" ); // app端生成的随机字符串
            
            if (! $signature || ! $token) {
                $this->wrong ( '缺少参数' );
            }
            
            $signature1 = md5 ( sha1 ( $token ) . C ( "SIGN_KEY" ) );
            
            if ($signature != $signature1) {
                $this->wrong ( '非法调用' );
            }

Continue reading “API设计资料整理”

linux-sources.list

ubuntu16.04阿里云源

  deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
  deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
  deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

Continue reading “linux-sources.list”

ecshop安装出现appserver不存在

解决方法

路径中文件夹的名字不能重复

wwwroot/ecshop/source/shop

wwwroot/ecshop/source/appserver

上面有两个ecshop文件夹名字只要把上面的末尾shop改成如下名字即可, 具体原因详见下面 <调试过程>

wwwroot/ecshop/source/web

wwwroot/ecshop/source/appserver

Continue reading “ecshop安装出现appserver不存在”