basename คือการอ่านชื่อไฟล์จาก path
file_put_contents คือการเขียน string ลงไฟล์
file_get_contents อ่านชื่อไฟล์เป็น string
โค้ด: เลือกทั้งหมด
$name = basename($picture);
file_put_contents("pictrue_mtb_crop/$name", file_get_contents($picture));