2016-04-06 4 views
-1

J'ai créé l'image de filigrane dynamique lorsque l'utilisateur télécharge en utilisant php, les images s'affichent également, mais le problème est je ne sais pas comment déplacer les images dans un dossier particulier dans mon sitecomment déplacer l'image de filigrane dans le dossier en 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); 

Répondre

0

Utilisez la fonction suivante

move_uploaded_file (string $filename , string $destination) 

$filename - name of the file to move 
$destination = folder where you want to move 
+0

ok, mais je dois télécharger image filigrane uniquement – Matheshwaran