how to store created jpg file in my site root (images) no download by in php [duplicate]

my php code creat jpg file and download

require_once('persian_txt2pic.php');
 $mor_Radio = $_POST['mor-Radio'];
if ($mor_Radio == 'saat') { $im = imagecreatefromjpeg('saati.jpg'); } else { $im = imagecreatefromjpeg('rooz.jpg'); } 
....
.....    
if ($mor_Radio == 'saat') { 
    $mor_date = $_POST['mor-date'];
    $name = $_POST['mor-name'];
  .....
.....
    $mor_day_helper = imageTTFBbox(12,0,$font,$mor_day);
    $base_loc_mor_day = abs($mor_day_helper[4] - $mor_day_helper[0]);
    @imagettftext($im, 12, -1,158-$base_loc_mor_day, 155, $blue, $font, $mor_day);*/
        
    $mor_day_helper = imageTTFBbox(12,0,$font,$mor_date);
    .....
} else { 
    ....
} 
header('Content-type: image/jpeg');
header('Content-Disposition: attachment; filename="'.$_POST['mor-name']."_".$nowdate."_".$mor_Radio.'".jpg"');

    // download jpg
    imagejpeg($im);
   // Free up memory
imagedestroy($im);

but i want can the jpg file save to my folder in my site root (images)