I had to use .txt
files as a database (I would have preferred to use SQL
, but it must be yes or yes in .txt
), the problem is that when making the change of editor of text is all unset, that is, if I use notepad shows it in "the right way", but if I open it from Sublime text
, it shows me another and some of these changes are not reflected in notebook ( then at the time of reading the file by PHP
a disaster is made), I am using the character |
to separate each field and each line is a record.
I suspect it's the UTF-8
encoding. It is the first time I work with .txt
in PHP
(I had worked before this way but in C++
).
Any recommendations working with .txt
?
(case 1)
Example Sublime text
:
12-180|Pool|||||
12-182|Pool|User1|||||
12-174|Pool|User2|||||
12-212|Pool||||||
Example Bloc de notas
:
12-180|Pool|||||12-182|Pool|User1|||||12-174|Pool|User2|||||12-212|Pool||||||