How can the "Call to undefined function exif_read_data()" error be resolved in a PHP script?

The "Call to undefined function exif_read_data()" error occurs when the Exif extension is not enabled in PHP. To resolve this issue, you need to enable the Exif extension in your PHP configuration file (php.ini).

// Enable the Exif extension in php.ini file
extension=exif