Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the content type of a .ini file?

Tags:

mime-types

I'd like to make a dynamically generated .ini file available for download, is there a standardized value for the Content-Type of .ini files?

I've found some places saying it's text/plain, but I'm a bit dubious.

like image 537
BenMorel Avatar asked Apr 18 '13 16:04

BenMorel


People also ask

What is type of .INI file?

An . INI file is a type of file that contains configuration information in a simple, predefined format. It is used by Windows OSs and Windows-based applications to store information about the user's preferences and operating environment.

How do I structure an INI file?

The INI file consists of sections and keys. The name of a section in the *. ini file is always entered inside the square brackets. Each section contains several keys (the key must be always assigned to the section that begins in the file before this key).

How do I read a .INI file?

How to Open and Edit INI Files. It's not a common practice for people to open or edit INI files, but they can be opened and changed with any text editor. Just double-clicking it will automatically open it in the Notepad application in Windows.

How do I find the MIME type of a file?

For detecting MIME-types, use the aptly named "mimetype" command. It has a number of options for formatting the output, it even has an option for backward compatibility to "file". But most of all, it accepts input not only as file, but also via stdin/pipe, so you can avoid temporary files when processing streams.

What are Ini filenames?

Common INI Filenames. desktop.ini - A hidden file located in Windows folders that saves viewing options for that specific folder. This file can specify an image that is used for the folder icon as well as appearance options for files within the folder.

What is the INI file format for a PHP configuration file?

PHP uses the INI format for its " php.ini " configuration file in both Windows and Linux systems. [5] [6] Desktop.ini files determine the display of directories in Windows, e.g., the icons for a directory. [7] The following example file has two sections: one for the owner of the software, and one for a payroll database connection.

What is the Inini file extension?

INI file. Linux and Unix systems also use a similar file format for system configuration. In addition, platform-agnostic software may use this file format for configuration. It is human-readable and simple to parse, so it is a usable format for configuration files that do not require much greater complexity.

How do I convert an INI file to another format?

The program or operating system that's using the file will only recognize it under the specific name and file extension that it's using. However, since INI files are just regular text files, you can use a program like Notepad++ to save it to another text-based format like HTM/HTML or TXT.


1 Answers

Checking with the IANA list of MIME Media Types shows us that .ini is not listed in the list of media types (and in particular, in the list of Text Media Types.)

Additionally, the Wikipedia entry on .ini files explains that .ini files are really just "simple text files."

One way to verify these findings is to run the following command on a given .ini file (in *nix, at least):

$ file --mime-type php.ini.default

which gives us the following result:

php.ini.default: text/plain
like image 189
summea Avatar answered Oct 06 '22 19:10

summea