Recently I had written a class and it had to save bits of information somewhere. I wanted to make the script installable just by placing it on a server so I didn't want to use any database. Instead I figured out I should save the data in a simple file. I could use serialize and file_put_contents which is very easy to write, but modifying such files manually in a text editor is a nightmare. So I decided to save the contents in a PHP file.
Unfortunately if there is an error in such file you will get parse error when including it.
Related Stats NIKON Programming Language NINTENDO Computer Hardware NOKIA IT professional NVIDIA
Source: http://de77.com/php/php-how-to-safely-include-file-with-possible-parse-errors
No comments:
Post a Comment