本文整理汇总了PHP中Curl::toString方法的典型用法代码示例。如果您正苦于以下问题:PHP Curl::toString方法的具体用法?PHP Curl::toString怎么用?PHP Curl::toString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Curl
的用法示例。
在下文中一共展示了Curl::toString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: access_deny
function access_deny()
{
global $USER_DETAILS;
include_once 'include/page_header.php';
if ($USER_DETAILS['alias'] != ZBX_GUEST_USER) {
show_error_message(S_NO_PERMISSIONS);
} else {
$req = new Curl($_SERVER['REQUEST_URI']);
$req->setArgument('sid', null);
$table = new CTable(null, 'warning');
$table->setAlign('center');
$table->setHeader(new CCol(S_CONFIG_ERROR_YOU_ARE_NOT_LOGGED_IN_HEAD, 'left'), 'header');
$table->addRow(new CCol(array(S_CONFIG_NOT_LOGGED_IN_ACCESS_DENIED, SPACE, bold(ZBX_GUEST_USER), '. ', S_CONFIG_ERROR_YOU_MUST_LOGIN, BR(), S_CONFIG_NOT_LOGGED_IN_NOTE), 'center'));
$url = urlencode($req->toString());
$footer = new CCol(array(new CButton('login', S_LOGIN, "javascript: document.location = 'index.php?request={$url}';"), new CButton('back', S_CANCEL, 'javascript: window.history.back();')), 'left');
$table->setFooter($footer, 'footer');
$table->show();
}
include_once 'include/page_footer.php';
}
示例2: access_deny
function access_deny()
{
global $USER_DETAILS;
include_once 'include/page_header.php';
if ($USER_DETAILS['alias'] != ZBX_GUEST_USER) {
show_error_message(S_NO_PERMISSIONS);
} else {
$req = new Curl($_SERVER['REQUEST_URI']);
$req->setArgument('sid', null);
$warning_msg = array('You cannot view this URL as a ', bold(ZBX_GUEST_USER), '. ', 'You must login to view this page.', BR(), 'If you think this message is wrong, ', ' please consult your administrators about getting the necessary permissions.');
$table = new CTable(null, 'warning');
$table->setAlign('center');
$table->setHeader(new CCol('You are not logged in', 'left'), 'header');
$table->addRow(new CCol($warning_msg));
$url = urlencode($req->toString());
$footer = new CCol(array(new CButton('login', S_LOGIN, "javascript: document.location = 'index.php?request={$url}';"), new CButton('back', S_CANCEL, 'javascript: window.history.back();')), 'left');
$table->setFooter($footer, 'footer');
$table->show();
}
include_once 'include/page_footer.php';
}