当前位置: 首页>>代码示例>>PHP>>正文


PHP wurl函数代码示例

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


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

示例1: module_entries

function module_entries($name, $types = array(), $rid = 0, $args = null)
{
    global $_W;
    $ts = array('rule', 'cover', 'menu', 'home', 'profile', 'shortcut', 'function');
    if (empty($types)) {
        $types = $ts;
    } else {
        $types = array_intersect($types, $ts);
    }
    $fields = implode("','", $types);
    $sql = 'SELECT * FROM ' . tablename('modules_bindings') . " WHERE `module`=:module AND `entry` IN ('{$fields}') ORDER BY eid ASC";
    $pars = array();
    $pars[':module'] = $name;
    $bindings = pdo_fetchall($sql, $pars);
    $entries = array();
    foreach ($bindings as $bind) {
        if (!empty($bind['call'])) {
            load()->func('communication');
            $response = ihttp_request($_W['siteroot'] . 'web/' . url('utility/bindcall', array('modulename' => $bind['module'], 'callname' => $bind['call'], 'args' => $args, 'uniacid' => $_W['uniacid'])), array('W' => base64_encode(iserializer($_W))));
            if (is_error($response)) {
                continue;
            }
            $response = json_decode($response['content'], true);
            $ret = $response['message'];
            if (is_array($ret)) {
                foreach ($ret as $et) {
                    $et['url'] .= '&__title=' . urlencode($et['title']);
                    $entries[$bind['entry']][] = array('title' => $et['title'], 'url' => $et['url'], 'from' => 'call');
                }
            }
        } else {
            if ($bind['entry'] == 'cover') {
                $url = wurl("platform/cover", array('eid' => $bind['eid']));
            }
            if ($bind['entry'] == 'menu') {
                $url = wurl("site/entry", array('eid' => $bind['eid']));
            }
            if ($bind['entry'] == 'rule') {
                $par = array('eid' => $bind['eid']);
                if (!empty($rid)) {
                    $par['id'] = $rid;
                }
                $url = wurl("site/entry", $par);
            }
            if ($bind['entry'] == 'home') {
                $url = murl("entry", array('eid' => $bind['eid']));
            }
            if ($bind['entry'] == 'profile') {
                $url = murl("entry", array('eid' => $bind['eid']));
            }
            if ($bind['entry'] == 'shortcut') {
                $url = murl("entry", array('eid' => $bind['eid']));
            }
            $entries[$bind['entry']][] = array('title' => $bind['title'], 'url' => $url, 'from' => 'define');
        }
    }
    return $entries;
}
开发者ID:legeng,项目名称:project-2,代码行数:58,代码来源:module.mod.php

示例2: module_entries

function module_entries($name, $types = array(), $args = null)
{
    $ts = array('rule', 'cover', 'menu', 'home', 'profile', 'shortcut', 'function');
    if (empty($types)) {
        $types = $ts;
    } else {
        $types = array_intersect($types, $ts);
    }
    $fields = implode("','", $types);
    $sql = 'SELECT * FROM ' . tablename('modules_bindings') . " WHERE `module`=:module AND `entry` IN ('{$fields}') ORDER BY eid ASC";
    $pars = array();
    $pars[':module'] = $name;
    $bindings = pdo_fetchall($sql, $pars);
    $entries = array();
    foreach ($bindings as $bind) {
        if (!empty($bind['call'])) {
            $site = WeUtility::createModuleSite($bind['module']);
            $ret = @$site->{$bind}['call']($args);
            if (is_array($ret)) {
                foreach ($ret as $et) {
                    $et['url'] .= '&__title=' . urlencode($et['title']);
                    $entries[$bind['entry']][] = array('title' => $et['title'], 'url' => $et['url'], 'from' => 'call');
                }
            }
        } else {
            if ($bind['entry'] == 'cover') {
                $url = wurl("platform/cover", array('eid' => $bind['eid']));
            }
            if ($bind['entry'] == 'menu') {
                $url = wurl("site/entry", array('eid' => $bind['eid']));
            }
            if ($bind['entry'] == 'rule') {
                $url = wurl("site/entry", array('eid' => $bind['eid'], 'id' => '{id}'));
            }
            if ($bind['entry'] == 'home') {
                $url = murl("entry", array('eid' => $bind['eid']));
            }
            if ($bind['entry'] == 'profile') {
                $url = murl("entry", array('eid' => $bind['eid']));
            }
            if ($bind['entry'] == 'shortcut') {
                $url = murl("entry", array('eid' => $bind['eid']));
            }
            $entries[$bind['entry']][] = array('title' => $bind['title'], 'url' => $url, 'from' => 'define');
        }
    }
    return $entries;
}
开发者ID:ruige123456,项目名称:dataMining,代码行数:48,代码来源:module.mod.php

示例3: url

function url($segment, $params = array())
{
    return wurl($segment, $params);
}
开发者ID:6662680,项目名称:qday_wx,代码行数:4,代码来源:common.func.php

示例4: array

        $shorts = array();
    }
    $shortcuts = array();
    foreach ($shorts as $i => $shortcut) {
        if (!empty($showmodules) && !in_array($shortcut['name'], $showmodules)) {
            continue;
        }
        $module = $modules[$shortcut['name']];
        if (!empty($module)) {
            $shortcut['title'] = $module['title'];
            if (file_exists('../addons/' . $module['name'] . '/icon.jpg')) {
                $shortcut['image'] = '../addons/' . $module['name'] . '/icon.jpg';
            } else {
                $shortcut['image'] = '../web/resource/images/nopic-small.jpg';
            }
            $shortcut['link'] = wurl('home/welcome/ext', array('m' => $shortcut['name']));
            $shortcuts[] = $shortcut;
        }
    }
    unset($shortcut);
}
if ($do == 'platform') {
    $title = '平台相关数据';
    $sysmodules = system_modules();
    $modules_other = array_diff(array_keys($modules), $sysmodules);
    $settings = uni_setting($_W['uniacid'], array('stat'));
    $day_num = !empty($settings['stat']['msg_maxday']) ? $settings['stat']['msg_maxday'] : 30;
    if ($_W['ispost']) {
        $m_name = trim($_GPC['m_name']);
        $starttime = strtotime("-{$day_num} day");
        $endtime = time();
开发者ID:keycoolkui,项目名称:weixinfenxiao,代码行数:31,代码来源:welcome.ctrl.php

示例5: createWebUrl

 protected function createWebUrl($do, $query = array())
 {
     $query['do'] = $do;
     $query['m'] = strtolower($this->modulename);
     return wurl('project/module', $query);
 }
开发者ID:ruige123456,项目名称:dataMining,代码行数:6,代码来源:account.class.php

示例6: doWebPtjmsg

 public function doWebPtjmsg()
 {
     global $_W, $_GPC;
     require_once 'sms.php';
     $sms = json_decode($sms, true);
     //var_dump($sms);
     if ($_GPC['sms_account'] && $_GPC['sms_password']) {
         $inithead = "<?php\n";
         $filelocale = fopen(dirname(__FILE__) . "/sms.php", "w") or die('保存失败');
         $model = $_GPC;
         fwrite($filelocale, $inithead);
         fclose($filelocale);
         $dataSource = json_encode($model);
         $data = '$sms=\'' . $dataSource . '\';';
         $t = file_put_contents(dirname(__FILE__) . "/sms.php", $data, FILE_APPEND);
         if ($t) {
             $url = wurl('site/entry', array('eid' => $_GPC['eid']));
             echo "<script>\r\n\t\t\tlocation.href='{$url}';\r\n\t\t\t</script>";
         }
     }
     include $this->template('msg');
 }
开发者ID:scbizu,项目名称:Wechat_we7Job,代码行数:22,代码来源:site.php

示例7: we7_refresh

 private function we7_refresh()
 {
     $href = wurl('profile/module/setting', array('m' => $this->modulename));
     echo "<script>location.href='{$href}';</script>";
 }
开发者ID:scbizu,项目名称:Wechat_we7Job,代码行数:5,代码来源:module.php


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