You are here: Re: Editing a (config) file « PHP Programming Language « IT news, forums, messages
Re: Editing a (config) file

Posted by Alvaro G. Vicario on 07/08/06 11:19

*** Sonnich escribió/wrote (7 Jul 2006 01:55:03 -0700):
> I have a file with some configation in it... I am wondering how I
> correct single values in there.
>
> The most secure is to recreate the file, then rename it.
>
> But is there a way to correct a line in the text file?
> setting1=bla -> setting1=blablabla

You may find parse_ini_file() useful:

array parse_ini_file ( string filename [, bool process_sections] )

parse_ini_file() loads in the ini file specified in filename, and returns
the settings in it in an associative array. By setting the last
process_sections parameter to TRUE, you get a multidimensional array, with
the section names and settings included. The default for process_sections
is FALSE


--
-+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация