Re: [PHP4BETA] PHP4/Zend parsign files ?

From: Date: Mon, 06 Mar 2000 13:54:44 +0000
Subject: Re: [PHP4BETA] PHP4/Zend parsign files ?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-11571@lists.php.net to get a copy of this message
Hi, Daniel S. Reichenbach wrote: > can i use PHP4/Zend to parse files? I would like to use it for > parsing files like Windows .ini files and files with tab separated > values. Egon replied : > In current CVS (or http://snaps.php.net/) is a function > parse_ini_file(). > Since these function has no proper prototype you have to read the source > code to figure out how it works. It is in ext/standard/basic_functions.c. Be careful ! The file given in argument is supposed to be a 'php.ini' file that will be parsed by the yy_parse function (generated by bison, using the php syntax and tags). The new function parse_ini_file initializes the php settings and has _nothing_ to do with what Daniel is looking for. As I understand it, what Daniel is looking for is some function that would initialize an array from a file, given some format. ASAIK, there's nothing like that in php, so he will have to use freads and regexes. Sounds fun ! :-) Flavien Lebarbé, --- Open Care

« previous php.version4 (#11571) next »