PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Blupixel IT Srl   PHP INI Editor Class   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Use sample file
Class: PHP INI Editor Class
View and edit INI files in Web forms
Author: By
Last change: Added example to change scanner mode on parsing the ini file
Date: 6 years ago
Size: 2,174 bytes


Class file image Download
/* -------------------------------------------------------------------
 * Author: Blupixel IT Srl
 * Last Modifcation Date: 23 Jan 2017
 * Website:
 * support at:
 * Copyright (c) 2017 Blupixel IT Srl - Trento (Italy)
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <>.

// include the class

// initialize the class object
$ini_editor = new IniEditor();

// include Javascript and CSS from jQuery and Bootstrap CDN
echo IniEditor::getCssJsInclude();
// include class CSS (use your own if you prefer)
echo IniEditor::getCSS();

// set folder where to put backups before saving the new version of the file (folder needs write permissions)
// set different Scanner Mode (optional)
// set the path of the file you want to edit or view
// set to true to allow edit of the config file (default is true)
// set to true to allow add of sections and conf in the config file (default is true)
// set to true to allow delete of conf in the config file (default is true)

// print the form. Use $ini_editor->getForm() to store it in a variable