PHP Classes

New Section in a blanc ini-file

Recommend this page to a friend!

      Extended Ini File  >  All threads  >  New Section in a blanc ini-file  >  (Un) Subscribe thread alerts  
Subject:New Section in a blanc ini-file
Summary:New Section not work on PHP7
Messages:1
Author:Marko Herm
Date:2017-08-19 14:39:08
 

  1. New Section in a blanc ini-file   Reply   Report abuse  
Picture of Marko Herm Marko Herm - 2017-08-19 14:39:08
Can You Help


<?php
require_once '../../extended-ini-file/IniFile.class.php';
echo "<pre>";

$datei='test.ini';
$iniorders= IniFile::LoadFromFile ($datei, $load_option = IniFile::LOAD_NEW, $separator = '=' ) ;

//$status = $inifile -> InsertSection ( $section, $section\_before, $comment\_before = null,$comment\_after = null ) ;
//$status = $inifile -> AppendSection ( $section, $comment\_before = null, $comment\_after = null ) ;


$status = $iniorders -> AppendSection ('general') ;
$iniorders -> SetKey ('general','timestamp', date ( 'Y/m/d H:i:s' ) ) ;
$iniorders -> SetKey ('general','shopnumbers', 3433 ) ;
$iniorders -> Save ( true, $datei ) ;


echo "</pre>";
?>