search

Home  >  Q&A  >  body text

Why can I only open files in C:\\windows when using file_get_contents to open a file?

Why when I use file_get_contents() to open a file, I can only open files in C:\\windows, but not elsewhere. I put the test file somewhere else. I am afraid that it will modify other files in windows.

L'z9L'z92555 days ago1160

reply all(2)I'll reply

  • Will

    Will2017-11-24 19:40:02

    It can be opened. If it is not in the same directory, you must write the complete path name, not just the file name.

    reply
    0
  • L'z9

    They all write the complete path name. After all, I just changed the folder. Windows was changed to user.

    L'z9 · 2017-11-24 19:45:12
  • Cancelreply