4

how do I clone and rename a file with php.

I need to take.

thumb_123.jpg

Copy it.

Rename it to thumb_456.jpg

I can do the renaming just fine with rename(). Its the copying that I don't get.

John
  • 83
  • 3
  • 8

1 Answers1

19

copy('thumb_123.jpg','thumb_456.jpg')

NullUserException
  • 83,810
  • 28
  • 209
  • 234
Mark Baker
  • 209,507
  • 32
  • 346
  • 385