Subversion Repositories oidplus

Rev

Rev 1050 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1050 Rev 1201
Line 23... Line 23...
23
 
23
 
24
// If you cannot use cron.sh or cron.bat for cronjobs, then you can use
24
// If you cannot use cron.sh or cron.bat for cronjobs, then you can use
25
// a WebCron service (e.g. https://www.easycron.com/ ) instead, using cron.php
25
// a WebCron service (e.g. https://www.easycron.com/ ) instead, using cron.php
26
 
26
 
27
use ViaThinkSoft\OIDplus\OIDplus;
27
use ViaThinkSoft\OIDplus\OIDplus;
-
 
28
use ViaThinkSoft\OIDplus\OIDplusException;
28
 
29
 
29
try {
30
try {
30
        require_once __DIR__ . '/includes/oidplus.inc.php';
31
        require_once __DIR__ . '/includes/oidplus.inc.php';
31
 
32
 
32
        ob_start();
33
        ob_start();
33
        OIDplus::init(false);
34
        OIDplus::init(false);
34
        OIDplus::invoke_shutdown();
35
        OIDplus::invoke_shutdown();
35
        ob_end_clean();
36
        ob_end_clean();
36
} catch (\Exception $e) {
37
} catch (\Exception $e) {
37
        http_response_code(500); // Internal Server Error
38
        http_response_code(500); // Internal Server Error
-
 
39
        $htmlmsg = $e instanceof OIDplusException ? $e->getHtmlMessage() : htmlentities($e->getMessage());
38
        echo $e->getMessage();
40
        echo $htmlmsg;
39
}
41
}