php function error warning -
My provision is environment php 5.2, now php is 5.3. When I took the website to a new environment, this error shows
error alert:
Fatal error: Call unchanged function imagecreatefrompng () xx / application and the error code is the ninth line in the following code:
secure function IM ($ file) {if (! File_exists ($ file)) die ('file does not exist.'); $ Info = getimagesize ($ file); Switch ($ info ['mime']) {case 'image / gif': $ mim = imagecreatefromgif ($ file); break; Case 'image / png': $ mim = imagecreatefrompng ($ file); // error line imagealphobalending ($ MIM, false); Imedecalpha ($ mim, true); break; Case 'image / jpeg': $ mim = imagecreatefromjpeg ($ file); break; Default: Dead ('File Format Errors.'); } Return $ MIM; } How should I change it?
Help phpinfo () check that you have PHP The Gd library for installation is . It seems that it is missing.
Comments
Post a Comment