我有一个生成数据(每小时)的 python 脚本,供 PHP 网页稍后读取。我应该将数据存储在哪里——数据库、文件或其他地方?将有接近 100-200KB/用户的数据。哪个会是更好的解决方案?数据不是纯文本,这意味着我必须使用 json 或 xml 来存储它。
示例数据:(XML易读,别怪我!)
<item uid="1">
<title>Malala's voice stronger, not silenced</title>
<rating>3</rating>
<date>Wednesday, May 8, 2013 2:03 PM</date>
<text>The attack was meant to silence the outspoken teenager who dared to defy the Taliban's ban against girls in school. Instead, it only made Malala's voice more powerful. After a school year that started with a shooting, Malala now eyes a summer of speaking at the U.N., telling her story in a new book and amplifying the issue of girls education. </text>
</item>