ILIAS  release_7 Revision v7.30-3-g800a261c036
server_side_error.php
Go to the documentation of this file.
1<?php
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}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
global $DIC
Definition: goto.php:24
exit
Definition: login.php:29
$factory
Definition: metadata.php:58
$_SERVER['HTTP_HOST']
Definition: raiseError.php:10
server_side_error()