Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $file= '/files/text.txt';
- $hash = md5(time().rand(11111111,99999999));
- $path = pathinfo($file);
- $new = $path['dirname'].DIRECTORY_SEPARATOR;
- $new .= $path['filename'].$hash.$path['extension'];
- rename($file, $new);
Add Comment
Please, Sign In to add comment