Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Configuration - Your Options
- $allowed_filetypes = array('.jpg','.gif','.bmp','.png'); // These will be the types of file that will pass the validation.
- $max_filesize = 524288; // Maximum filesize in BYTES (currently 0.5MB).
- $info =pathinfo($_FILES['userfile']['name']);
- $name = basename($_FILES['userfile']['name']);
- $ext = $info['extension'];
- $upload_path = 'upload/' . $user . '/'; // The place the files will be uploaded to (currently a 'files' directory).
- $filename = $_FILES['userfile']['name']; // Get the name of the file (including file extension).
- $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1); // Get the extension from the filename.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement