• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getServerURL函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getServerURL函数的典型用法代码示例。如果您正苦于以下问题:PHP getServerURL函数的具体用法?PHP getServerURL怎么用?PHP getServerURL使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getServerURL函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: fileURL

function fileURL($filename)
{
    $fileURL = getServerURL() . '/admin/reseller_locator/products/product_images/' . $filename;
    //	if($GLOBALS['debug']) {
    //		echo 'file\'s full path on the webserver: ' . $fileURL;
    //	}
    return $fileURL;
}
开发者ID:ruebenramirez,项目名称:Contact-Locator,代码行数:8,代码来源:files.php


示例2: buildURL

/**
 * Build a URL to a server action
 */
function buildURL($action = null, $escaped = true)
{
    $url = getServerURL();
    if ($action) {
        $url .= '/' . $action;
    }
    return $escaped ? htmlspecialchars($url, ENT_QUOTES) : $url;
}
开发者ID:utopszkij,项目名称:keszlet,代码行数:11,代码来源:session.php


示例3: getServer

/**
 * Instantiate a new OpenID server object
 */
function getServer()
{
    global $CONFIG;
    static $server;
    $op_endpoint = getServerURL();
    if (!isset($server)) {
        $server =& new Auth_OpenID_Server(getOpenIDServerStore(), $op_endpoint);
    }
    return $server;
}
开发者ID:lorea,项目名称:Hydra-dev,代码行数:13,代码来源:session.php


示例4: authCancel

function authCancel($info)
{
    if ($info) {
        setRequestInfo();
        $url = $info->getCancelURL();
    } else {
        $url = getServerURL();
    }
    return redirect_render($url);
}
开发者ID:Jobava,项目名称:diacritice-meta-repo,代码行数:10,代码来源:common.php


示例5: action_default

/**
 * Handle a standard OpenID server request
 */
function action_default()
{
    global $store;
    $server =& getServer();
    $method = $_SERVER['REQUEST_METHOD'];
    /*$request = null;
      if ($method == 'GET') {
          $request = $_GET;
      } else {
          $request = $_POST;
      } */
    $request = $server->decodeRequest();
    if (!$request) {
        return "";
        //about_render();
    }
    setRequestInfo($request);
    if (in_array($request->mode, array('checkid_immediate', 'checkid_setup'))) {
        $identity = getLoggedInUser();
        if (isTrusted($identity, $request->trust_root, $request->return_to)) {
            if ($request->message->isOpenID1()) {
                $response =& $request->answer(true);
            } else {
                $response =& $request->answer(true, false, getServerURL(), $identity);
            }
        } else {
            if ($request->immediate) {
                $response =& $request->answer(false, getServerURL());
            } else {
                if (!getLoggedInUser()) {
                    $_SESSION['last_forward_from'] = current_page_url() . '?' . http_build_query(Auth_OpenID::getQuery());
                    system_message(elgg_echo('openid_server:not_logged_in'));
                    forward('login');
                }
                return trust_render($request);
            }
        }
        addSregFields(&$response);
    } else {
        $response =& $server->handleRequest($request);
    }
    $webresponse =& $server->encodeResponse($response);
    foreach ($webresponse->headers as $k => $v) {
        header("{$k}: {$v}");
    }
    header(header_connection_close);
    print $webresponse->body;
    exit(0);
}
开发者ID:lorea,项目名称:Hydra-dev,代码行数:52,代码来源:actions.php


示例6: action_default

/**
 * Handle a standard OpenID server request
 */
function action_default()
{
    $server =& getServer();
    $method = $_SERVER['REQUEST_METHOD'];
    $request = null;
    if ($method == 'GET') {
        $request = $_GET;
    } else {
        $request = $_POST;
    }
    $request = Auth_OpenID::fixArgs($request);
    $request = $server->decodeRequest($request);
    if (!$request) {
        return about_render();
    }
    setRequestInfo($request);
    if (in_array($request->mode, array('checkid_immediate', 'checkid_setup'))) {
        if (isTrusted($request->identity, $request->trust_root)) {
            $response =& $request->answer(true);
            $sreg = getSreg($request->identity);
            if (is_array($sreg)) {
                foreach ($sreg as $k => $v) {
                    $response->addField('sreg', $k, $v);
                }
            }
        } else {
            if ($request->immediate) {
                $response =& $request->answer(false, getServerURL());
            } else {
                if (!getLoggedInUser()) {
                    return login_render();
                }
                return trust_render($request);
            }
        }
    } else {
        $response =& $server->handleRequest($request);
    }
    $webresponse =& $server->encodeResponse($response);
    foreach ($webresponse->headers as $k => $v) {
        header("{$k}: {$v}");
    }
    header(header_connection_close);
    print $webresponse->body;
    exit(0);
}
开发者ID:honchoman,项目名称:singpolyma,代码行数:49,代码来源:actions.php


示例7: ircColor

<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$extra = "";
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("profile", $user["id"], "", "_");
} else {
    $link = getServerURL() . "?uid=" . $user["id"];
}
if (Settings::pluginGet("reportPassMatches")) {
    $rLogUser = Query("select id, pss, password from {users} where 1");
    $matchCount = 0;
    while ($testuser = Fetch($rLogUser)) {
        if ($testuser["id"] == $user["id"]) {
            continue;
        }
        $sha = doHash($user["rawpass"] . $salt . $testuser['pss']);
        if ($testuser['password'] == $sha) {
            $matchCount++;
        }
    }
    if ($matchCount) {
        $extra .= "-- " . Plural($matchCount, "password match") . " ";
    }
}
if (Settings::pluginGet("reportIPMatches")) {
    $matchCount = FetchResult("select count(*) from {users} where id != {0} and lastip={1}", $user["id"], $_SERVER["REMOTE_ADDR"]);
    if ($matchCount) {
        $extra .= "-- " . Plural($matchCount, "IP match") . " ";
    }
开发者ID:RoadrunnerWMC,项目名称:ABXD-plugins,代码行数:31,代码来源:newuser.php


示例8: ircColor

<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("thread", $tid, "", "_");
} else {
    $link = getServerURL() . "?tid=" . $tid;
}
if ($forum['minpower'] <= 0) {
    ircReport("" . $c2 . "New thread by{$c1} " . ircUserColor($thename, $loguser['sex'], $loguser['powerlevel']) . "{$c2}: {$c1}" . $thread["title"] . "{$c2} (" . $forum["title"] . ")" . " -- " . $link);
}
开发者ID:RoadrunnerWMC,项目名称:ABXD-plugins,代码行数:16,代码来源:newthread.php


示例9: setRequestInfo

 setRequestInfo($info);
 $req_url_path = substr($req_url, strpos($req_url, ":"));
 $user_path = substr($user, strpos($user, ":"));
 if ($info->message->isOpenID1() && $req_url_path != $user_path) {
     register_error(sprintf(elgg_echo("openid_server:loggedin_as_wrong_user"), $req_url, $user));
     forward();
 } else {
     $trust_root = $info->trust_root;
     $trusted = isset($trusted) ? $trusted : isTrusted($identity, $trust_root);
     if ($trusted) {
         setRequestInfo();
         $server =& getServer();
         if ($info->message->isOpenID1()) {
             $response =& $info->answer(true, null, $req_url);
         } else {
             $response =& $info->answer(true, null, getServerURL(), $identity);
         }
         addSregFields($response, $info, $identity);
         $webresponse =& $server->encodeResponse($response);
         $new_headers = array();
         foreach ($webresponse->headers as $k => $v) {
             $new_headers[] = $k . ": " . $v;
         }
         writeResponse(array($new_headers, $webresponse->body));
         exit(0);
     } elseif ($fail_cancels) {
         setRequestInfo();
         forward($info->getCancelURL());
     } else {
         writeResponse(trust_render($info));
     }
开发者ID:lorea,项目名称:Hydra-dev,代码行数:31,代码来源:trust.php


示例10: ircColor

<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("post", $pid, "", "_");
} else {
    $link = getServerURL() . "?pid=" . $pid;
}
if ($forum['minpower'] <= 0) {
    ircReport("" . $c2 . "New reply by{$c1} " . ircUserColor($thename, $loguser['sex'], $loguser['powerlevel']) . "{$c2}: {$c1}" . $thread["title"] . "{$c2} (" . $forum["title"] . ")" . " -- " . $link);
}
开发者ID:RoadrunnerWMC,项目名称:ABXD-plugins,代码行数:16,代码来源:newreply.php


示例11: ircColor

<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
$uncolor = ircUserColor($thename, $loguser['sex'], 0);
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("objectdbchanges", $sprite['id'], 'rev=' . $rev, '_');
} else {
    $link = getServerURL() . "?page=objectdbchanges&id={$sprite['id']}&rev={$rev}";
}
ircReport("{$c2}Object {$c1}{$spritename} ({$sprite['id']}) {$c2}edited by {$c1}{$uncolor} {$c2}(rev. {$rev}) -- {$link}");
开发者ID:Servault,项目名称:Blargboard,代码行数:15,代码来源:objectdb_objedit.php


示例12: ircColor

<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
$uncolor = ircUserColor($thename, $loguser['sex'], 0);
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("objectdbchanges", $id, 'rev=' . $previousrev, '_');
} else {
    $link = getServerURL() . "?page=objectdbchanges&id={$id}&rev={$previousrev}";
}
$objname = FetchResult("SELECT s.name FROM {sprites} s LEFT JOIN {spriterevisions} sr ON sr.id=s.id AND sr.revision=s.revision WHERE s.id={0}", $id);
ircReport("{$c2}Object {$c1}{$objname} ({$id}) {$c2}reverted by {$c1}{$uncolor} {$c2}(rev. {$previousrev}) -- {$link}");
开发者ID:Servault,项目名称:Blargboard,代码行数:16,代码来源:objectdb_objrevert.php


示例13: ircColor

<?php

$c1 = ircColor(Settings::pluginGet("color1"));
$c2 = ircColor(Settings::pluginGet("color2"));
$thename = $loguser["name"];
if ($loguser["displayname"]) {
    $thename = $loguser["displayname"];
}
$uncolor = ircUserColor($thename, $loguser['sex'], 0);
if ($urlRewriting) {
    $link = getServerURLNoSlash() . actionLink("wiki", $page['id'], '', '_');
} else {
    $link = getServerURL() . "?page=wiki&id=" . $page['id'];
}
if ($page['new'] == 2) {
    ircReport("{$c2}New wiki page: {$c1}" . url2title($page['id']) . " {$c2}created by {$c1}{$uncolor} {$c2} -- {$link}");
} else {
    ircReport("{$c2}Wiki page {$c1}" . url2title($page['id']) . " {$c2}edited by {$c1}{$uncolor} {$c2}(rev. {$rev}) -- {$link}");
}
开发者ID:Servault,项目名称:Blargboard,代码行数:19,代码来源:wikixd_pageedit.php


示例14: getFullRequestedURL

function getFullRequestedURL($https = false)
{
    return getServerURL($https) . $_SERVER['REQUEST_URI'];
}
开发者ID:Servault,项目名称:Blargboard,代码行数:4,代码来源:links.php


示例15: getRequestURL

function getRequestURL()
{
    $serverURL = getServerURL();
    $requestURL = $_SERVER['REQUEST_URI'];
    return $serverURL . $requestURL;
}
开发者ID:humor-zo,项目名称:chaofan,代码行数:6,代码来源:function_url.php


示例16: send_cancel

function send_cancel($info)
{
    if ($info) {
        $url = $info->getCancelURL();
    } else {
        $url = getServerURL();
    }
    return redirect_render($url);
}
开发者ID:ahelsing,项目名称:geni-portal,代码行数:9,代码来源:server.php


示例17: getCompleteURL

function getCompleteURL()
{
    return getServerURL() . $_SERVER["REQUEST_URI"];
}
开发者ID:Kavir91,项目名称:Convocatoria,代码行数:4,代码来源:index.php


示例18: render_admin

function render_admin($method, &$request, &$template)
{
    global $auth, $storage;
    Server_needAuth($request);
    Server_needAdmin();
    if (array_key_exists('username', $request)) {
        $username = $request['username'];
        $pass1 = $request['pass1'];
        $pass2 = $request['pass2'];
        $success = true;
        $errors = Server_accountCheck($username, $pass1, $pass2);
        if ($errors) {
            foreach ($errors as $e) {
                $template->addError($e);
            }
        } else {
            // Good.
            if ($username != ADMIN_USERNAME && $auth->newAccount($username, $pass1, $request)) {
                // Add an identity URL to storage.
                $storage->addIdentifier($username, Server_getAccountIdentifier($username));
                Server_addMessage('Account created.');
                Server_redirect(getServerURL(), 'admin');
            } else {
                $template->addError("Sorry; the username '{$username}' is already taken!");
            }
        }
    } else {
        if (array_key_exists('remove', $request)) {
            foreach ($request['account'] as $account => $on) {
                $auth->removeAccount($account);
                $storage->removeAccount($account);
            }
            Server_addMessage('Account(s) removed.');
            Server_redirect(getServerURL() . "?search=" . $request['search'], 'admin');
        }
    }
    if (array_key_exists('search', $request) && ($request['search'] || array_key_exists('showall', $request))) {
        // Search for accounts.
        if (array_key_exists('showall', $request)) {
            $results = $auth->search();
            $template->assign('showall', 1);
        } else {
            $results = $auth->search($request['search']);
        }
        $template->assign('search', $request['search']);
        $template->assign('search_results', $results);
    }
    $template->display('admin.tpl');
}
开发者ID:alx,项目名称:openid-server,代码行数:49,代码来源:render.php



注:本文中的getServerURL函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getSesionDato函数代码示例发布时间:2022-05-15
下一篇:
PHP getServerSessionId函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap