I want to store arrays in file.
I triend csv (fgetcsv
, fputcsv
) but got tons of error related with locale. I cant continue using this.
I worked with serialize but editing is very hard. Also there is also a bug related
.
我正在寻找一种更好的、国际化的方法来将变量存储在文件中。
SQLite可以解决。我想知道SQLite与MySQL或基本串行化相比的性能如何。如果有虫子,我也会碰到。
注意事项:
- Arrays are 2 dimensional arrays. Same as
table->field
s in DB structure. - I don’t want to require additional program to install, portability is real problem, since people could install to any server, PHP, MySQL should be enough.
- Why I don’t want to store in MySQL, because I will use this structure to serve cache. The final product I want to publish, could run without DB, for most of the time.
- I wrote a basic structure using
fgetcsv
&fputcvs
. There is bug! It strips some chars. That’s why I m looking for alternative. I don’t want to invent whole wheel from beginning but PHP guys don’t understand programming: please review: http://bugs.php.net/bug.php?id=48507