本文整理汇总了PHP中http::get_error方法的典型用法代码示例。如果您正苦于以下问题:PHP http::get_error方法的具体用法?PHP http::get_error怎么用?PHP http::get_error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类http
的用法示例。
在下文中一共展示了http::get_error方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load_skin
load_skin('tools');
// content of the target web object
$input = '';
// maybe we have a cookie string to process
$cookie = '';
if (isset($_REQUEST['cookie']) && strlen($_REQUEST['cookie'])) {
$cookie = $_REQUEST['cookie'];
}
// we have an URL to scan
$reference = '';
if (isset($_REQUEST['reference']) && strlen($_REQUEST['reference'])) {
$reference = $_REQUEST['reference'];
// fetch the object through the web
if (!($input = http::proceed($reference, '', '', $cookie))) {
// the standard way to localize string throughout YACS is to invoke i18n::s() -- see i18n/i18n.php
Logger::error(sprintf(i18n::s('error while fetching %s'), $reference) . ' (' . http::get_error() . ')');
}
// the user has submitted some content to crunch
} elseif (isset($_REQUEST['input']) && strlen($_REQUEST['input'])) {
$input = $_REQUEST['input'];
}
// the path to this page
$context['path_bar'] = array('tools/' => i18n::s('Tools'));
// the title of the page
// in YACS templates, it is placed into $context['title']
$context['page_title'] = i18n::s('Fat Index');
// the splash message
$context['text'] .= '<p>' . i18n::s('This script strips tags and white space to evaluate the amount of useful bytes. Then it computes the fat index as follows:') . '</p>' . "\n" . '<dl><dd>' . i18n::s('FAT Index = 10 log( Raw Bytes / Useful Bytes )') . '</dd></dl>' . "\n";
// we at least ask for registration
// look at shared/surfer.php for more information on the YACS security model
if (!Surfer::is_logged()) {