Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $path_array = wp_upload_dir(); // normal format start
- $file_name = pathinfo($user_pic ,PATHINFO_FILENAME).time().".".pathinfo($user_pic ,PATHINFO_EXTENSION);
- $imgtype = strtolower(pathinfo($user_pic,PATHINFO_EXTENSION));
- $targetpath = $path_array["path"]."/".$file_name;
- move_uploaded_file($user_pic, $targetpath );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement