1 Star 0 Fork 44

SpaceHub / bookmark

forked from wuwenbin / bookmark 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README

网址书签

安装步骤

  • 部署代码并配置好web服务器;
  • 创建并导入db/bookmark.sql到数据库;
  • 修改root/config/base.php配置数据库连接参数及其他选项;
  • 申请第三方应用并配置root/config/oauth.php
  • 修改root/data/*目录为可写权限;

url重写配置参考

配置文件root/config/base.php修改:

switch (App::getName()) {
    case "public":
        $config["rewriteRules"] = array(
            "User_Index" => "/[uid]"
        );
        break;
    case "mobile":
        $config["rewriteRules"] = array(
            "User_Index" => "/m/[uid]"
        );
        break;
}

nginx配置url重写规则:

rewrite ^/([0-9]+)$ /?do=User_Index&uid=$1&$args last;
rewrite ^/m/([0-9]+)$ /m/?do=User_Index&uid=$1&$args last;

apache配置.htaccessurl重写规则:

<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteRule ^([0-9]+)$ /?do=User_Index&uid=$1&%{QUERY_STRING} [L]
RewriteRule ^m/([0-9]+)$ /m/?do=User_Index&uid=$1&%{QUERY_STRING} [L]
</ifmodule>

第三方应用申请地址

新浪SAE配置说明

  • 数据库表请使用SAE提供的PHPMyAdmin导入;
  • 数据库连接配置请直接填写SAE_MYSQL_*开头的常量;
  • 鉴于SAE目录不能直接写入文件,所以模板编译路径需要配置到临时目录SAE_TMP_PATH,示例如下:

配置文件root/config/base.php添加如下代码:

// 模板编译路径
$config["templateCompilePath"] = SAE_TMP_PATH;
return $config; // 添加在此行之前

阿里云ACE配置说明

  • 创建应用,并开通数据库扩展服务,使用mysql客户端工具导入数据库表;
  • 数据库连接配置参考如上云数据库配置;
  • URL重写参考阿里云ACE文档,如下给出一个示例配置:
// app.yaml添加如下代码:
rewrite:
    - url: ^/([0-9]+)$
      script: /index.php?do=User_Index&uid=$1&$args last
    - url: ^/m/([0-9]+)$
      script: /m/index.php?do=User_Index&uid=$1&$args last

API接口文档

官方主页

授权协议

  • MIT

Empty file

About

多用户网址书签管理工具,可作为浏览器内置书签功能的增补。 expand collapse
PHP
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
PHP
1
https://gitee.com/WM-Design/bookmark.git
git@gitee.com:WM-Design/bookmark.git
WM-Design
bookmark
bookmark
master

Search