I am trying to uniq to a string so the following code has:
It creates a range and adds the file type such as: 19572185.pngCode:$n = "$imagename.$ext";
Can anyone advise how I add uniqid() to a string.
Code:case 'image/jpeg': $ext = 'jpg'; break; case 'image/gif': $ext = 'gif'; break; case 'image/png': $ext = 'png'; break; case 'image/tiff': $ext = 'tif'; break; default: $ext = ''; break; } if ($ext) { $n = "uniqid().$ext"; move_uploaded_file($_FILES['filename']['tmp_name'], $n); echo "Upload image '$name' as '$n':<br />"; } else echo "'$name' is not accepted image file"; } else echo "No image has been uploaded";



Reply With Quote






Bookmarks