ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
server_side_error.php
Go to the documentation of this file.
1 <?php
2 function server_side_error()
3 {
4  global $DIC;
5  $factory = $DIC->ui()->factory();
6  $renderer = $DIC->ui()->renderer();
7 
8  if (isset($_GET['example']) && $_GET['example'] == 4) {
9  // The File-Dropzones will expect a valid json-Status (success true or false).
10  echo json_encode(['success' => false, 'message' => 'Unable to store file on server']);
11  exit(0);
12  }
13 
14  $uploadUrl = $_SERVER['REQUEST_URI'] . '&example=4';
15  $dropzone = $factory->dropzone()->file()->standard($uploadUrl)
16  ->withMessage('Drag and drop your files here. Note that any upload will be failing!')
17  ->withUploadButton($factory->button()->standard('Upload', ''));
18  return $renderer->render($dropzone);
19 }
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
global $DIC
Definition: saml.php:7
$_GET["client_id"]
$factory
Definition: metadata.php:43
server_side_error()
exit
Definition: backend.php:16