Hello,
i don't found the file "class.Config.php" in the wrox zip code (ch09).. i try make one by my self but i'm not sure work well.. return me some errors... anyone can help me please?
i try this code:
class.Config.php
Code:
<?php
class Config {
const LOGGER_LEVEL = 75;
const DEBUG_LEVEL = 100;
const LOGGER_FILE = 'C:/root/chp09/prova.log';
public static function getConfig() {
return SELF::LOGGER_LEVEL;
return SELF::LOGGER_FILE;
}
public static function addConfig($constLog, $value) {
if($constLog == 'LOGGER_LEVEL') {
SELF::LOGGER_LEVEL = $value
} elseif ($constLog == 'DEBUG_LEVEL') {
SELF::DEBUG_LEVEL = $value
} else {
SELF::LOGGER_FILE = $value;
echo 'save value final path.';
}
}
?>
but retun to me this error.. and after fix this, return others..
Code:
Parse error: syntax error, unexpected '=' in C:\Inetpub\wwwroot\php\M1\ch09\class.Config.php on line 16
