php oc::handlerequest(),index.php

/**

*

* Your webserver seems to be not configured to use PHP or PHP is not installed.

* Please contact your administrator or follow our documentation:

* https://docs.nextcloud.com/server/13/admin_manual/installation/source_installation.html

*

* @copyright Copyright (c) 2016, ownCloud, Inc.

*

* @author Georg Ehrke

* @author Joas Schilling

* @author Jörn Friedrich Dreyer

* @author Lukas Reschke

* @author Morris Jobke

* @author Robin Appelman

* @author Sergio Bertolín

* @author Thomas Müller

* @author Vincent Petry

*

* @license AGPL-3.0

*

* This code is free software: you can redistribute it and/or modify

* it under the terms of the GNU Affero General Public License, version 3,

* as published by the Free Software Foundation.

*

* This program is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

* GNU Affero General Public License for more details.

*

* You should have received a copy of the GNU Affero General Public License, version 3,

* along with this program. If not, see

*

*/

require_once __DIR__ . '/lib/versioncheck.php';

try {

require_once __DIR__ . '/lib/base.php';

OC::handleRequest();

} catch(\OC\ServiceUnavailableException $ex) {

\OC::$server->getLogger()->logException($ex, array('app' => 'index'));

//show the user a detailed error page

OC_Template::printExceptionErrorPage($ex, 503);

} catch (\OC\HintException $ex) {

try {

OC_Template::printErrorPage($ex->getMessage(), $ex->getHint(), 503);

} catch (Exception $ex2) {

try {

\OC::$server->getLogger()->logException($ex, array('app' => 'index'));

\OC::$server->getLogger()->logException($ex2, array('app' => 'index'));

} catch (Throwable $e) {

// no way to log it properly - but to avoid a white page of death we try harder and ignore this one here

}

//show the user a detailed error page

OC_Template::printExceptionErrorPage($ex, 500);

}

} catch (\OC\User\LoginException $ex) {

OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage(), 403);

} catch (Exception $ex) {

\OC::$server->getLogger()->logException($ex, array('app' => 'index'));

//show the user a detailed error page

OC_Template::printExceptionErrorPage($ex, 500);

} catch (Error $ex) {

try {

\OC::$server->getLogger()->logException($ex, array('app' => 'index'));

} catch (Error $e) {

http_response_code(500);

header('Content-Type: text/plain; charset=utf-8');

print("Internal Server Error\n\n");

print("The server encountered an internal error and was unable to complete your request.\n");

print("Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.\n");

print("More details can be found in the webserver log.\n");

throw $ex;

}

OC_Template::printExceptionErrorPage($ex, 500);

}

一键复制

编辑

Web IDE

原始数据

按行查看

历史

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值