He is my code:
if (function_exists('gd_info')) {
$gda = gd_info();
$gd['version'] = $gda['GD Version'];
//$gd['num'] = ereg_replace('[[:alpha:][:space:]()]+','',$gda['GD Version']);
$gd['freetype'] = $gda["FreeType Support"];
$gd['gif_read'] = $gda["GIF Read Support"];
$gd['gif_make'] = $gda["GIF Create Support"];
//$gd['jpg'] = $gda["JPG Support"];
$gd['png'] = $gda["PNG Support"];
The commented line produced errors:
Function ereg_replace() is deprecated
Undefined index: JPG Support
I am using XAMPP 1.7.7
Anyone knows how to fix this?
What I was trying to achieve is producing thumbnails of jpeg pictures. Now that I commented those lines. I am unable to display the thumbnails.
Any help is appreciated.
ereg functions have been deprecated in PHP 5.3 in favor of the PCRE functions. I’m not familiar with ereg syntax, but it looks like it might be equivilant to
preg_replace('/[a-zA-Z ()]+/', '', $gda['GD Version']).Furthermore, the commented line should read:
$gd['jpg'] = $gda["JPEG Support"];i.e. JPEG with an E.