Warning: file_get_contents(): Filename cannot be empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you guys, I fixed my code.

Here is the fixed.

if(!empty($convert))

{

$imageData = base64_encode(file_get_contents($convert));

        // Format the image SRC:  data:{mime};base64,{data};
        $src = 'data: '.exif_imagetype($convert).';base64,'.$imageData;

        // Echo out a sample image
        echo '<img src="', $src, '">';



echo '<pre>'; print_r($convert); echo '</pre>';

}



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux