如何在php中将水印图像移动到文件夹中


how to move watermark image to folder in php

当用户使用php上传时,我已经创建了动态水印图像,图像也在显示,但问题是我不知道如何将图像移动到我的网站中的特定文件夹中

$path=JPATH_SITE.'/media/truematrimony/watermark-K'.$id.'_pho_2.jpg';   
 move_uploaded_file($_FILES["profile_multi2"]["tmp_name"],$path);
$font_path=$_SERVER['DOCUMENT_ROOT'].'/templates/srinivasmatrimony/font/GeosansLight.ttf'; 
$card = imagecreatefromjpeg($path);
$font_med = 12;
$white = imagecolorallocate($card, 0, 0, 0);
imagettftext($card, $font_lrg, , 40, , $white,    $font_path,"kongumarriage.com");
$filenametemp= $_SERVER['DOCUMENT_ROOT'].'/media/truematrimony/watermark- K'.$id.'_pho_2.jpg';
imagejpeg($card, $filenametemp); 
$ImageData = file_get_contents($filenametemp); 
$ImageDataEnc = base64_encode($ImageData); 
unlink($filenametemp);

使用以下函数

move_uploaded_file ( string $filename , string $destination )
$filename - name of the file to move
$destination = folder where you want to move