/** * Log message * * @param $msg */ public static function log($msg) { $session = Session::instance(); $log_messages = $session->get("log"); if (!$log_messages) { $log_messages = array(); } $log_messages[] = $msg; $session->set("log", $log_messages); }
<body> <div class="container"> <h3>Загрузка изображений</h3> <?php if (\imageframework\environment\Session::instance()->has('log')) { ?> <div class="alert alert-info" role="alert"> <?php foreach (\imageframework\environment\Session::instance()->get('log') as $msg) { ?> <?php echo $msg; ?> <br> <?php \imageframework\environment\Session::instance()->del('log'); ?> <?php } ?> </div> <?php } ?> <div class="panel panel-default"> <div class="panel-heading">Изображение 1</div> <div class="panel-body"> <form enctype="multipart/form-data" method="post"> <div class="form-group"> <input type="file" name="image"> </div>
<?php define('DIR', __DIR__); require_once 'autoload.php'; $session = \imageframework\environment\Session::instance(); $session->start(); $app = new \imageframework\Application(); $app->run();