-2

When i try to create file with fopen('../files/report_'.$time.'.xlsx','w'); it will create file with random extension report_1552395474844.xlsx.M0Vv7Z.

Can you help?

David
  • 354
  • 6
  • 19

1 Answers1

0

There are 2 options.

First: Your code runs and never closes the file. For that time it is considered a temp file which needs to be closed to get its real name. So try closing the file right after writing in it.

Second: You're looking in the wrong folder and an old file which has been created somewhen before