PHP Encode image in 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:
- alias seeddb='php artisan db:seed'
- creat folder in php
- clear cache command in laravel
- check multiple permission laravel spatie
- convert php timestamp to date
- array_merge_recursive in php
- check if key exists array
- array exists in php
- check if string include char php
- check if key exists in associative array php
- drupal 8 user_load
- capitalize all letters php
- Error: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.
- check if string container string php
- check if a string has a certain character php
- check if string has word
- ?name="" value in php
- convert text toupper case php
- add days to current date php
- check if array has key
- Laravel 8 seed
- $headder in php
- command line how to create folder and file php
- !php.net date