write_php_ini (function)

Return to Knowledgebase

Purpose

Provides a safe way to turn an array into an ini file

Location

users/helpers/helpers.php

Parameters

# Parameter Data Type Required Description
1 $array Yes undocumented
2 $file Yes undocumented

Example

write_php_ini(['mode'=>1],"settings.ini.php");

Further Documentation:

Note. This will create the file even if it doesn't exist. It is also recommended that you call your ini files ini.php so they cannot be read through the browser. Notice if you do  you can navigate to that file in the browser and read it, but with  you cannot.