PHP flat file management class
Does anyone know of a class for managing flat file, in PHP? I am making an app that uses them, and I want to know if开发者_如何学Go there is already one that I can use, without making my own.
Take a good look at Zend_Config and Zend_Config_Writer, components in the Zend Framework. They stand pretty much alone, so you don't need to import too many other parts of ZF outside of the loader and exception bits.
They allow you to read and write configuration data in an exported PHP array, as an INI file, as JSON, as XML or as YAML. They aren't super light weight, but they are useful, comprehensive, and more importantly, well-written and well-tested.
精彩评论