encode image to base64 php
$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:
- create project laravel
- current date string in php
- find data type in php
- artisan clear commands
- exec output php
- display errr php
- Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, string given in
- check sizee string laravel
- find strings that contain php
- The key "initial" is not recognized and ignored.
- cache delete or forget in laravel
- convert stdclass object to array php
- date format pgp
- check mail php
- dump all variables twig
- char uppercase php
- apache php e_warnings e_notice off
- blade comment
- echo header in php
- check if a string contains specific words in php
- date('Y ', $date);
- PHP Warning: Module 'soap' already loaded in Unknown on line 0
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/composer/composer.phar/s
- artisan make auth