vendredi 8 février 2019

production.ERROR: Call to undefined function Illuminate

I'm very new to Laravel. Initially, my project was working perfectly, few weeks now uploaded images refused to display, all uploaded images are broken. When I checked my Laravel Log here is what I get`

production.ERROR: Call to undefined function Illuminate\Filesystem\finfo_file() {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined function Illuminate\Filesystem\finfo_file() at /home/crescen1/crescentlaravel/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:299)

Here is the code I have in my filesystem.php: line 299`

/**
 * Get the mime-type of a given file.
 *
 * @param  string  $path
 * @return string|false
 */
public function mimeType($path)
{
    return finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);
}

/**
 * Get the file size of a given file.
 *
 * @param  string  $path
 * @return int
 */
public function size($path)
{
    return filesize($path);
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire