You have to define the structure of the flat files so you can keep the parent->child relationship seen on most message boards. What you will be doing is essentially creating a small database system for your specific needs. It will need to be able to add, delete, modify and view records just like a MySQL based solution. You will probably want to create a class to do this.
Of course using flat files will be slower than using an RDBMS but for a smaller site this shouldn't be an issue, and you can also run into file corruption if multiple users try and write to the file at the same time. PostgreSQL and the others handle this contention quite well using table locks and transaction caching.
These are just a couple issues to look at.
You might actually want to look into creating an XML based message board where you flat files are actually XML files.
<i>You Asked: PS: How do CGI Message Boards work? They dont have databases like MySQL right?</i>
It depends... CGI scripts can be written in Perl, C, C++, ... Just about any language for that matter. All of these languages have associated libraries to connect to any number of databases just like PHP. So to answer this question, it depends on whether the script writer likes databases or likes flat files.
Hope this helps.