Advantages and disadvantages of using INI files

Asked

Viewed 262 times

4

Could you tell me the possible advantages and disadvantages of using a file .INI to configure an application? Preferably PHP applications.

  • It is usually used enough not to need to create an executable with a different configuration directly in the application, so in the application is just pointed the file path. INI and changes can be made directly in this file, mainly if it is a database, specific configuration for a particular company, or other parameter any that needs to do a different operation in an executable or other.

  • 3

    The main advantage is simplicity because it is a simple operation on a text file , the disadvantage is that a wrong configuration podecser made, just have access to the text file.

  • It is a php application, it is more recommended to do in INI or PHP (This file would be with the database config)

  • 1

    Your question has 2 votes to close as "mostly based on opinions" (and will have 3 counting on mine), after all what João thinks important to use INI in PHP can be something that Pedro does not appreciate. Or something Maria considers a strong reason not to use the INI files, Paula might think there’s nothing wrong. In the end, it all depends on the specific circumstances of your application and the requirements involved, circumstances and requirements such that you have not described.

  • Related: http://answall.com/questions/50275/qual-a-vantagem-de-utilizar-include-array-vs-arquivo-de-configura%C3%A7%C3%A3o

1 answer

1

INI Archives are considered a standard. An "informal standard" for configuration files for software. INI Archives are simple text files, with a basic structure composed of sections, properties and values.

I see only advantages in its use, but it will always depend on the needs of a project.

I don’t think it’s very relevant in small projects. But when we work on team projects or if there is a need for others to be able to parameterize it is important to have a standard because it simplifies and very.

I would point out that it is totally independent of the software, readable and simple to analyze, so it is a usable format for configuration files even with some degree of complexity.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.