-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?

1
  • can you share your code ? Commented Mar 12, 2019 at 13:01

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

1 Comment

It only happens when i try to create file with extension .xlsx . When i try .txt or .xls files are created properly

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.