I'm using this code:
Except the numbers ($rand) are appearing on the right side of the extension. How would I make it on the left of the extension?
PHP Code:
$file12 = $_FILES['site_url']['name']; // Get the name of the file (including file extension).
$file12 = preg_replace('/\s/', '_', $file12);
$filename = $file12.$rand;
$ext = substr($filename, strpos($filename,$rand,'.'), strlen($filename)-1); // Get the extension from the filename.
Comment