PHP code example of openbuildings / environment-backup
1. Go to this page and download the library: Download openbuildings/environment-backup library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
openbuildings / environment-backup example snippets
$environment = new Environment(array(
'globals' => new Environment_Group_Globals(),
'server' => new Environment_Group_Server(),
'static' => new Environment_Group_Static(),
));
$environment->backup_and_set(array(
'_POST' => array('new stuff'),
'REMOTE_HOST' => 'example.com',
'MyClass::$private_var' => 10
));
// Do some stuff that changes / uses these variables
$environment->restore();