dpylt7626401 2016-08-18 18:56
浏览 884
已采纳

PHP:我如何确定file_put_contents将保存文件的位置?

If I just use file_put_contents('file.txt', $stuff), how do I determine where that's going to save? In some files it saves to a completely different folder.

  • 写回答

1条回答 默认 最新

  • dongyuan2388 2016-08-18 23:01
    关注

    log/echo both $stuff and getcwd(). If you don't want to analyse such pairs, use realpath()

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?