mediashare/show-content

检测文件类型并为网络界面生成用户友好的HTML视图。(图片/视频/音频/文本/Markdown)

安装: 401

依赖项: 0

建议者: 0

安全: 0

星标: 1

关注者: 2

分支: 0

开放问题: 1

语言:JavaScript

1.2.4 2020-05-31 14:50 UTC

README

检测文件类型并为网络界面生成用户友好的HTML视图。

支持的文件类型

  • 图片
  • 视频
  • 音频
  • 文本
  • Markdown

安装

composer require mediashare/show-content

用法

<?php
include 'vendor/autoload.php';
use Mediashare\ShowContent\ShowContent;

$file = "files/image.png";
$showContent = new ShowContent($file);
$showContent->show();

$file = "files/video.webm";
$showContent = new ShowContent($file);
$showContent->show();

$file = "files/audio.mp3";
$showContent = new ShowContent($file);
$showContent->show();

$file = "files/text.txt";
$showContent = new ShowContent($file);
$showContent->show();

$file = "files/text.md";
$showContent = new ShowContent($file);
$showContent->show();