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.
Advertisement
Answer
log/echo both $stuff
and getcwd()
. If you don’t want to analyse such pairs, use realpath()