-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbootstrap.php
More file actions
36 lines (30 loc) · 732 Bytes
/
bootstrap.php
File metadata and controls
36 lines (30 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* Bootstrap the library
*/
require_once __DIR__ . '/../vendor/autoload.php';
/**
* Setup error reporting
*/
error_reporting(E_ALL);
ini_set('display_errors', 1);
/**
* Setup the timezone
*/
ini_set('date.timezone', 'Europe/Amsterdam');
/**
* Create a new instance of the URL class with the current URI, stripping the query string
*/
$currentUri = \League\Url\Url::createFromServer($_SERVER);
$currentUri->setQuery('');
function inline_image($rawData)
{
return '<img src="' .
'data:image/' . Gregwar\Image\Image::fromData($rawData)->guessType() . ';' .
'base64,' . base64_encode($rawData) .
'">';
}
/**
* Load the credential for the different services
*/
require_once __DIR__ . '/init.php';