Jump to content

Fatal error: Call to undefined function file_extension()


ansipants

Recommended Posts

when I try to upload the image on submit, I get there following error:

 

Fatal error: Call to undefined function file_extension() in editlogo.php on line 41

Line 41 is the very last line of the code.


// get form data, making sure it is valid
	$img_name = $_FILES['myimage']['name'];
        $tmp_name = $_FILES['myimage']['tmp_name'];
        $img_size = $_FILES['myimage']['size'];
        
        if ($img_name) {
            
            if ($img_size>2097152) {
                die('Max image size is 2mb!');

           } else {
                $file_ext = file_extension($img_name);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.