Jump to content

WHAT DOES THIS MEAN


zeusthegreat

Recommended Posts

function upload($file_id, $folder="", $types="") { if(!$_FILES[$file_id]['name']) return array('','No file specified'); $file_title = $_FILES[$file_id]['name']; //Get file extension $ext_arr = split("\.",basename($file_title)); $ext = strtolower($ext_arr[count($ext_arr)-1]); //Get the last extension //Not really uniqe - but for all practical reasons, it is $uniqer = substr(md5(uniqid(rand(),1)),0,5); $file_name = $uniqer . '_' . $file_title;//Get Unique Name $all_types = explode(",",strtolower($types)); if($types) { if(in_array($ext,$all_types)); else { $result = "'".$_FILES[$file_id]['name']."' is not a valid file."; //Show error if any. return array('',$result); }

}

 

 

 

 

WHAT I MEAN IS if(!$_FILES[$file_id]['name']) return array('','No file specified'); WHAT DOES THE EXCLAMATION MARK MEAN BEFORE $_FILES

 

HAVE GOOGLED AND I GET DIFFERENT ANSWERS, SO THOUGHT I WOULD ASK SOMEBODY WHO WOULD KNOW FOR CERTAIN

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...