解决Windows:Call to undefined function exif_imagetype()

Obviously, some extensions are not enabled when php is installed, so that exif_imagetype()this method cannot be executed, so it needs to be turned on.

Many people on the Internet say that the following two extensions need to be turned on:

extension=php_exif.dll
extension=php_mbstring.dll

But it was only half right. I also opened these two extensions according to the online article at the beginning, but it was still the same error.

Later, I finally found the correct method, that is, after opening these two extensions, and moving the handle to extension=php_mbstring.dllthe extension=php_exif.dllfront, the final display is as follows:

 

Remember to modify the php point ini in the php directory , and copy this file to the C:\Window\ directory to overwrite the original one. In addition, IIS needs to be restarted.

In this way, the problem is solved.

knowledge expansion

geolocation_imagetype

exif_imagetype— Determine the type of an image.

illustrate

exif_imagetype(string $filename): int

exif_imagetype()Read the first bytes of an image and check its signature.

This function is available

Guess you like

Origin blog.csdn.net/mo3408/article/details/132194426