Files
old-wiaas-legacy/api-wiaas/sandbox_scripts/update_application_mode.php

17 lines
495 B
PHP
Raw Normal View History

2018-06-11 11:09:35 +02:00
<?php
$filePath = __DIR__.'/../config.php';
try {
$file_content = file_get_contents($filePath);
if($file_content){
$file_content = str_replace("define('APPLICATION_MODE', 'DEV');", "define('APPLICATION_MODE', 'TEST');", $file_content);
file_put_contents($filePath, $file_content);
echo "Config file updated to TEST mdoe!";
}else{
echo "Unable to open config file!";
}
} catch (Exception $e) {
echo "Can not open file $filePath: " . $e;
}
?>