I’d like to seed my database with content that’s currently encoded in JSON files. Is there a best practice for where to place such files? E.g.,
- Create an “assets/data” folder?
- Create a “src/data” folder?
- Some other place?
I plan to load the file(s) with something like this …
$dataFileContent= @file_get_contents($pathToFile);
What’s the cleanest way to get the filesystem path to that folder (ie, so I can derive $pathToFile)?
Thanks in advance for any insight.