dlg-projects/streamfile 问题修复 & 功能扩展

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

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

dlg-projects/streamfile

Composer 安装命令:

composer require dlg-projects/streamfile

包简介

Stream file, use HTTP Partial Content

关键字:

README 文档

README

Stream File is a package that displays the partial content of a file

Installation

You may use Composer to install StreamFile to your project:

composer require dlg-projects/streamfile

Use

use DlgProjects\StreamFile;

$stream = new StreamFile('myFolder/myFile.mp4');
$stream->startStream();

Functions available

  1. public functions:
  • getBufferSize : get the size of the buffer used
  • getFile : get the file that will be opened for stream
  • getFileName : get the name that will be displayed in the HTML header
  • getFileSize : get file size
  • getRangeEnd : get the end of the range requested by HTML header
  • getRangeStart : get the start of the range requested by HTML header
  • getTypeMime : get mime type of file
  • setBufferSize : define the size of the buffer (default: 524288 byte)
  • setFileName : define the name of the file that will be sent in the header (default: the same as the file)
  • setFileSize : define the file size. It's automatically set by the constructor. But it may be necessary to set it manually if the constructor cannot.
  • setTypeMime : define the type mime. It's automatically set by the constructor but you can change it
  • startStream : starts streaming the file

License

This library is released under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-11-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固