Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What approach could You suggest, If I don't have mysql or other database support on webhost, but I need to store data ( textual information ) for website somewhere. It's informative site for school - approx 20 to 50 visitors per day, 6 to 7 categories with 3 to 5 subcategories. Would xml files be normal ?

share|improve this question
A database would be normal, xml files would be doable. – Ben L Jul 21 '11 at 17:49
up vote 0 down vote accepted

XML would be perfectly fine, especially with the amount of data I'm supposing you are going to be getting/generating, a csv type list with a parser of some sort (jscript, ajax, php) that could handle it would also be acceptable.

I would also contact your webhost to find out what they have for PHP support, because if they do it should have SQLite built in if nothing else. If your webhost has no dynamic languages allowed (PHP etc) I would just suggest scrapping them and finding another that supports what you need in the first place.

share|improve this answer
I cant move to other webhost! – wolf3d Jul 21 '11 at 18:11
Since you're using codeigniter, we'll assume that you have PHP then, so you should be fine with SQLite unless your host sucks more than a "lady of the evening" on a busy night. – Jeff Langemeier Jul 21 '11 at 18:15
@wolf3d, in case you haven't looked into SQLite because it sounds too much like a database with a server component, it's not. It stores data in files, but lets you access it in nice SQLy ways, instead of having to parse XML or CSV or whatever... – grossvogel Jul 21 '11 at 18:38
already sent msg to server admin for this information about SQLite – wolf3d Jul 21 '11 at 18:50
i checked phpinfo page myself, looks that there is no SQLite support at all... – wolf3d Jul 22 '11 at 6:36

Unless your webhost did something to cripple PHP, you do have SQLite support. Thats built into PHP5. That only requires the ability to read/write to local files.

share|improve this answer

I would write the data to flat files as a JSON string. PHP has very good support for encoding and decoding arrays or objects as JSON.

XML is bloated and often difficult to work with in PHP. Save yourself a lot of time with JSON.

You could even have multiple flat files each to represent what would typically be a table in a database...

  • categories.txt
  • products.txt
share|improve this answer
Upvoted as the simplest solution. I added an answer with code samples – Mike Miller Jan 9 '15 at 14:47

I would recommend using the Jekyll Static Site Generator. It requires Ruby to be installed on your local development machine. It uses a simple template language that gets compiled down to static HTML files you can FTP to a web server. It's what GitHub uses when you host your own documentation sites for a Git repository.

Using something like CodeIgniter without a database feels like you are hitting a thumbtack with a sledge hammer, especially if you are the one doing all the updates.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.