togos/php-n2r 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

togos/php-n2r

最新稳定版本:0.1.16

Composer 安装命令:

composer require togos/php-n2r

包简介

Library (and stand-alone scripts) for handling /uri-res/N2R requests backed by a ccouch repository.

README 文档

README

Serves blobs identified by urn:sha1 and urn:bitprint URNs via the /uri-res/N2R?+(URN) convention (see RFC 2169).

Can be used as a library or by itself.

Installation as stand-alone script

  1. Check this project out to a directory under your document root called uri-res.
  2. If you feel like it, run composer install
  3. Copy config.php.example to config.php and edit it.
  4. Serve using your favorite web server (or php -S localhost:1234 dispatch.php)

If vendor/autoload.php does not exist (because you did not run composer install), scripts will fall back to loading the included versions of the libraries from ext-lib. This way PHPN2R can continue to run on old computers with very old versions of PHP and composer isntalled, like that raspberry Pi 2B under the stairs that's been running the same old Raspbian since 2012.

Repository format

See ContentCouchRepositoryFormat.

The repositories listed in config.php are assumed to be of the following format

  <repository directory>/
    data/
      <arbitrary sector name>/
        <first 2 letters of base32-encoded SHA-1>/
          <base32-encoded SHA-1 of file contents>

You can have any number of sectors, and their names are not important. They just act as buckets within which you can organize your data (e.g. you might put really important stuff in one, less important stuff somewhere else, data of questionable value in yet another).

Use as a library

Explicitly not documented, because the API isn't so nice and I'm probably the only one in the world to whom it is useful, anyway.

TODO:

Look at http://pablotron.org/software/zipstream-php/ for making zips of directories

统计信息

  • 总下载量: 14.16k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固