mediashare / show-content
检测文件类型并为网络界面生成用户友好的HTML视图。(图片/视频/音频/文本/Markdown)
1.2.4
2020-05-31 14:50 UTC
Requires
- erusev/parsedown: ^1.7
- twig/twig: ^3.0
Requires (Dev)
- tracy/tracy: ^2.7
This package is auto-updated.
Last update: 2024-09-10 17:19:35 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();