file_get_contents to base64
$path = 'myfolder/myimage.png';
$type = pathinfo($path, PATHINFO_EXTENSION);
$data = file_get_contents($path);
$base64 = 'data:image/' . $type . ';base64,' . base64_encode($data);
Also in PHP:
- console.log from server php
- date time with am pm in php
- add on day to date php
- file to binary php
- create an exception php
- exception php throw
- codeigniter load form_validation
- cacert.pem file_get_contents openssl
- display al errros php
- define header in different file php
- Laravel 7 do not see my new added seeder
- buddypress author link
- date time long format php
- A random character from a string of characters:
- download file zip from subdirectory using php
- check format have image laravel
- 2 = null laravel
- /phpspreadsheet 1.15.0 requires ext-dom * centos yum
- console.log for php
- base64 to image
- alpha numeric to upper case in php
- composer with specific php version
- Capital letters php
- capital string php