PHP Classes

File: examples/config/example_ini.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/config/example_ini.php   Download  
File: examples/config/example_ini.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 574 bytes
 

Contents

Class file image Download
<h1>A_Config_Ini</h1>
<p>This example shows using error handler or exceptions. Edit file names to show loading of INI files.</p>
<?php
include 'config.php';
include
'../../A/autoload.php';

$config = new A_Config_Ini('example1.ini', '');
$config->loadFile();
if (
$config->isError()) {
    echo
"Error found: loading file<br/>";
}
dump($config);

$config = new A_Config_Ini('example1.ini', '', new Exception('Ini file error.'));
try {
   
$config->loadFile();
} catch (
Exception $e) {
    echo
'Caught exception: ', $e->getMessage(), '<br/>';
}
dump($config);