<p>What are the best practices around creating flat file database structures in PHP?</p>

<p>A lot of more matured PHP flat file frameworks out there which I attempt to implement SQL-like query syntax which is over the top for my purposes in most cases. (I would just use a database at that point).</p>

<p>Are there any elegant tricks out there to get good performance and features with a small code overhead?</p>

One framework I'm considering would be for a blogging platform. Since just about any possible view of data you would want would be sorted by date, I was thinking about this structure:
One directory per content node:
```
```
./content/YYYYMMDDHHMMSS/
```
```
Subdirectories of each node including
```
```
/tags  
/authors  
/comments
```
```
As well as simple text files in the node directory for pre- and post-rendered content and the like.
This would allow a simple PHP
```
glob()
```
call (and probably a reversal of the result array) to query on just about anything within the content structure:
```
```
glob("content/*/tags/funny");
```
```
Would return paths including all articles tagged "funny".