|
image uploaded file overlap
hi, i have problems in upload image in one folders
but this code will be finally worked but whne i will upload next image it file name automatally rename abc all images name. but i want to that not rename if image name and not overlapping on it. do y have any idea that
yours regarded
dharmendra
<?
$upImg = $_FILES['upload']['name'];
if(isset($upImg)){
echo "File Name: ".$upImg;
echo "<br>File Temp Name: ".$_FILES['upload']['tmp_name'];
echo "<br>File Size: ".$_FILES['upload']['size'];
echo "<br>File Type: ".$_FILES['upload']['type'];
if($_FILES['btnUpload']['size']<(50*1024)){
$path="tmp/";
$arrImg=explode('.',$_FILES['upload']['name']);
copy($_FILES['upload']['tmp_name'],$path."abc.".$arrImg[1]);
}
else{
echo "Image size exceeds 50 kb";
}
}
?>
|