thepip3r Posted June 13, 2006 Share Posted June 13, 2006 If I have a bunch of INI files that have all sorts of information in them that I need to read and write into a database, is there an easy way to get those into a database safely??? Let me elaborate: For characters like, $,[,],{,},!,(,), parse_ini_file()/PHP are reporting a "parsing error" on the lines where it encounters one of the previously described characters. Does anyone have an easy way that I can get PHP to read those characters without having to change around the script that generated the original INI file? Link to comment https://forums.phpfreaks.com/topic/11914-anyone-ever-used-parse_ini_file/ Share on other sites More sharing options...
kenrbnsn Posted June 13, 2006 Share Posted June 13, 2006 Did you see the following note in the [a href=\"http://www.php.net/parse_ini_file\" target=\"_blank\"]fine manual[/a]?[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--][b]Note:[/b] There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, and false. Values null, no and false results in "", yes and true results in "1". Characters {}|&~![()" must not be used anywhere in the key and have a special meaning in the value.[/quote]Also read the comments posted there, you might find something that works for your situation.Ken Link to comment https://forums.phpfreaks.com/topic/11914-anyone-ever-used-parse_ini_file/#findComment-45212 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.