PHP code example of wuyumin / file2base64
1. Go to this page and download the library: Download wuyumin/file2base64 library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wuyumin / file2base64 example snippets
use File2base64\File2base64;
$file2base64 = new File2base64();
# $file2base64 = new File2base64(['bmp' => 'image/bmp']);
$file2base64->toFile('file2base64.png', 'file2base64.txt');
# echo $file2base64->toBase64('file2base64.png');