PHP code example of nattreid / app-manager
1. Go to this page and download the library: Download nattreid/app-manager 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/ */
nattreid / app-manager example snippets
/** @var \NAttreid\AppManager\AppManager @inject */
public $app;
$maintenance = isset($maintenance) ? $maintenance : __DIR__ . '/../temp/maintenance';
if (file_exists($maintenance)) {
if (isset($_GET['maintenanceOff']) || (isset($argv) && $argv[1] == 'maintenanceOff')) {
unlink($maintenance);
echo "Maintenance off\n";
exit;
}
$app->onInvalideCache[]=function(){
$this->cache->clean();
};