承接 wuyumin/file2base64 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

wuyumin/file2base64

Composer 安装命令:

composer require wuyumin/file2base64

包简介

File to base64.

README 文档

README

中文说明

base64 files are used for embedding in web pages.

Usage:

install in Composer

composer require wuyumin/file2base64

php code

require __DIR__ . '/../vendor/autoload.php';

use File2base64\File2base64;

$file2base64 = new File2base64();
# $file2base64 = new File2base64(['bmp' => 'image/bmp']);

$file2base64->toFile('file2base64.png', 'file2base64.txt');
# echo $file2base64->toBase64('file2base64.png');

Laravel Framework

(tips:Laravel 5.5+ can ignore step 2、3,version 5.5+ support to register automatically)

  1. Composer install composer require wuyumin/file2base64

  2. (ServiceProvider)add the follow line to the section providers of config/app.php
    File2base64\Laravel\ServiceProvider::class,

  3. (Facades)add the follow line to the section aliases of config/app.php(optional)
    'File2base64' => File2base64\Laravel\Facade::class,

Result:

base64 file string

data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==

HTML code use like this:

html code

<img src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" alt="">

web page demo: All in one page with base64 audio,no web link with audio file

Supported Type:

.png、.jpg、.jpeg、.gif、.ico、.mp3、.ogg

You can init for other type use array.

$file2base64 = new File2base64(['bmp' => 'image/bmp']);

统计信息

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

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-10-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固