SyntaxFix
Write A Post
Hire A Developer
Questions
If you want to move the file in new path with keep original file name. use this:
$source_file = 'foo/image.jpg'; $destination_path = 'bar/'; rename($source_file, $destination_path . pathinfo($source_file, PATHINFO_BASENAME));