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


PHP R函数代码示例

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


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

示例1: relation

 /**
  * 设置工作流步骤的关联人员
  * 
  * @return string
  */
 public function relation($data)
 {
     $this->setCurrentAction('step', 'relation', 'workflow')->checkPermission();
     $url = R('common', $this->module . '.' . $this->class . '.' . $this->function, ['stepid' => $data['id'], 'workflow_id' => \Request::input('id')]);
     $html = $this->hasPermission ? '<a class="step-relation" target="_blank" href="' . $url . '"><i class="fa fa-user"></i></a>' : '<i class="fa fa-user" style="color:#ccc"></i>';
     return $html;
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:12,代码来源:WorkflowStep.php

示例2: access

 public function access()
 {
     $consumer_key = '10467-0ed56679a754835ac1e15622';
     $redirect_url = U('/API/access@ideat.org');
     $request_url = "https://getpocket.com/v3/oauth/request";
     $authorize_url = 'https://getpocket.com/v3/oauth/authorize';
     if (!session('?request_token')) {
         $post_data = array("consumer_key" => $consumer_key, "redirect_uri" => $redirect_url);
         $post_data = json_encode($post_data);
         $result = curl($request_url, $post_data);
         $request_token = $result['code'];
         session('request_token', $request_token);
         $authorize_url = "https://getpocket.com/auth/authorize?request_token={$request_token}&redirect_uri={$redirect_url}";
         redirect($authorize_url);
     } else {
         $request_token = session('request_token');
         session('request_token', null);
         $post_data = array("consumer_key" => $consumer_key, "code" => $request_token);
         $post_data = json_encode($post_data);
         $result = curl($authorize_url, $post_data);
         $access_token = $result['access_token'];
         session('access_token', $access_token);
         session('username', $result['username']);
         R('pocket');
     }
 }
开发者ID:ysking,项目名称:commlib,代码行数:26,代码来源:APIAction.class.php

示例3: navBtn

 /**
  * 面包屑中的按钮
  *
  * @access public
  */
 public function navBtn()
 {
     $this->setCurrentAction('position', 'add', 'blog')->checkPermission();
     $url = R('common', $this->module . '.' . $this->class . '.' . $this->function);
     $html = $this->hasPermission ? '<div class="btn-group" style="float:right;"><a href="' . $url . '" title="增加新的文章推荐位" class="btn btn-primary btn-xs"><span aria-hidden="true" class="glyphicon glyphicon-plus"></span>增加新的文章推荐位</a></div>' : '';
     return $html;
 }
开发者ID:jjzhai,项目名称:mylaravel,代码行数:12,代码来源:Position.php

示例4: xml_parse_tags

/**
 * 循环标签匹配
 * $matches  为匹配到的内容[数组]
 * 统一隐式传参 session('from')  session('to')
 * @return string 
 */
function xml_parse_tags($matches)
{
    $taglist = array();
    $taglist = session('AMANGO_PARSETAGS');
    preg_match('/(?<=<amango:)[^>]+(?=>)/', $matches[1], $tag_name);
    $tagname = str_replace('tag', '', $tag_name[0]);
    $tagitem = $taglist[$tagname];
    if (empty($tagitem)) {
        return "";
    } else {
        //wx_error(json_encode($tagitem));
        foreach ($tagitem as $key => $value) {
            switch (strtolower($value['type'])) {
                case 'func':
                    $funcname = $value['action'];
                    $str[$key] = $funcname($value['param']);
                    break;
                case 'action':
                    $actionname = $value['action'];
                    $param = array();
                    $param = parse_config($value['param']);
                    $str[$key] = R($actionname, $param);
                    break;
                case 'static':
                    $str[$key] = $value['param'];
                    break;
                default:
                    wx_error('标签解析不存在');
                    break;
            }
        }
        $newstr = implode("\n", $str);
        return $newstr . "\n";
    }
}
开发者ID:wmk223,项目名称:amango_V3,代码行数:41,代码来源:tool.php

示例5: navBtn

 /**
  * 面包屑中的按钮
  *
  * @access public
  */
 public function navBtn()
 {
     $this->setCurrentAction('user', 'add', 'foundation')->checkPermission(Acl::GROUP_LEVEL_TYPE_USER);
     $url = R('common', $this->module . '.' . $this->class . '.' . $this->function);
     $html = $this->hasPermission ? '<div class="btn-group" style="float:right;"><a href="' . $url . '" title="增加新的用户" class="btn btn-primary btn-xs"><span aria-hidden="true" class="glyphicon glyphicon-plus"></span>增加新的用户</a></div>' : '';
     return $html;
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:12,代码来源:User.php

示例6: main

 public function main()
 {
     if (!A()->isAdmin()) {
         return R('/');
     }
     return T()->newevent(['formAction' => U('/create/')]);
 }
开发者ID:jthemphill,项目名称:tournament,代码行数:7,代码来源:index.php

示例7: F

 static function F($a)
 {
     if (G(H(I, 0, 1)) === 'J') {
         if (K('L') && K('N')) {
             return O($a);
         }
         if (K('Q') && R(S, 'T', 'U')) {
             return V($a);
         }
     } else {
         if (K('Q')) {
             return V($a);
         }
         static $b = Z;
         if ($b === Z) {
             $b = @AB('AC', 'AD');
         }
         if ($b !== Z && $b !== AF) {
             return AG($b, $a);
         }
         if (K('L')) {
             return O($a, AK);
         }
     }
     throw new \AL('AM');
 }
开发者ID:exakat,项目名称:exakat,代码行数:26,代码来源:_Namespace.14.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     R('Tool/Too/chechLogin');
     R('Home/Public/showHeader');
     R('Home/Public/showFooter');
 }
开发者ID:leifuchen0111,项目名称:company,代码行数:7,代码来源:BaseController.class.php

示例9: _initialize

 protected function _initialize()
 {
     if (in_array(CONTROLLER_NAME, F('modules'))) {
         R('Content/' . ACTION_NAME);
         exit;
     }
 }
开发者ID:925800521,项目名称:itskycms,代码行数:7,代码来源:EmptyController.class.php

示例10: delete

 /**
  * 文章评论删除操作
  *
  * @access public
  */
 public function delete($data)
 {
     $this->setCurrentAction('comment', 'delete', 'blog')->checkPermission();
     $url = R('common', $this->module . '.' . $this->class . '.' . $this->function, ['id' => $data['id']]);
     $html = $this->hasPermission ? '<a title="删除" href="javascript:org.Common.ajaxDelete(\'' . $url . '\', \'ajax-reload\', \'确定吗?\');"><i class="fa fa-trash-o"></i></a>' : '<i class="fa fa-trash-o" style="color:#ccc"></i>';
     return $html;
 }
开发者ID:mikegit2014,项目名称:laravelback,代码行数:12,代码来源:Comment.php

示例11: api

 public function api()
 {
     $url = I('get.url');
     $var = I('get.var');
     $arr = array($var);
     R($url, $arr);
 }
开发者ID:cwcw,项目名称:cms,代码行数:7,代码来源:PublicController.class.php

示例12: api

 public function api()
 {
     $path = explode('/', str_replace('common/index/api/', '', $_SERVER['PATH_INFO']));
     $module = array_shift($path);
     $action = array_shift($path);
     R('Api/' . $module . '/' . $action, $path);
 }
开发者ID:torry999,项目名称:lingshi,代码行数:7,代码来源:IndexController.class.php

示例13: index

 public function index()
 {
     $keyword = I('get.words');
     //获取分类的英文名称
     if (!$keyword) {
         $keyword = $_POST["words"];
     }
     $map['title|name|description'] = array('like', '%' . $keyword . '%');
     $list = M('Document')->where($map)->select();
     $this->assign('searchlist', $list);
     $this->assign('keyword', $keyword);
     /* 左侧菜单 */
     $menu = R('index/menulist');
     $this->assign('categoryq', $menu);
     /* 购物车调用*/
     $cart = R("shopcart/usercart");
     $this->assign('usercart', $cart);
     if (!session('user_auth')) {
         $usercart = $_SESSION['cart'];
         $this->assign('usercart', $usercart);
     }
     /* 热词调用*/
     $hotsearch = R("Index/getHotsearch");
     $this->assign('hotsearch', $hotsearch);
     $this->display();
 }
开发者ID:norain2050,项目名称:yershop,代码行数:26,代码来源:SearchController.class.php

示例14: prepay

 public function prepay()
 {
     //SDK请求的参数
     $req_params = $_REQUEST['sdk_req_params'];
     //验证
     $sign_str = $req_params['app_id'] . $req_params['iap_id'] . $req_params['mnc'] . $req_params['macaddress'] . $req_params['imsi'] . $req_params['imei'] . $req_params['timestamp'];
     //        var_dump($sign_str);exit;
     $str_sign = md5($sign_str);
     if (strtolower($str_sign) != strtolower($req_params['sign'])) {
         $this->catchMsg('参数校验错误');
     }
     //验证计费点信息,返回所需计费点相关参数
     $iapInfo = $this->validateIapInfo($req_params);
     //合并参数
     $req_iap_params = $req_params + $iapInfo;
     $mncConfObject = new MNC();
     //选择运营商走各自的计费支付流程
     $mnc = array('46000' => 'CMCC', '46001' => 'CUCC', '46002' => 'CMCC', '46003' => 'CTCC', '46005' => 'CTCC', '46006' => 'CUCC', '46007' => 'CMCC', '46011' => 'CTCC', '46020' => 'CRC');
     switch ($mnc[$req_params['mnc']]) {
         case 'CRC':
             break;
         case 'CMCC':
             break;
         case 'CUCC':
             $params = $mncConfObject->cucc_config + $req_iap_params;
             R('Unicom/applyOrder', array('params' => $params));
             break;
         case 'CTCC':
             $params = $mncConfObject->ctcc_config + $req_iap_params;
             R('Ctcclttx/applyOrder', array('params' => $params));
             break;
         default:
             return;
     }
 }
开发者ID:tangkun86,项目名称:sdk,代码行数:35,代码来源:ApiController.class.php

示例15: showlist

 function showlist()
 {
     //获得User控制器的number方法返回的信息
     //当前UserController会通过自动加载机制引入
     //ThinkPHP/Library/Think/Think.class.php
     // function autoload();
     $user = new UserController();
     //通过快捷函数实例化控制器对象
     //new一个控制器对象给我们返回
     //A([项目://][模块/]控制器标志);
     $user = A("User");
     echo $user->number();
     $goods = A("Admin/Goods");
     echo $goods->getMoney();
     //跨项目、跨模块调用指定控制器
     //$index = A("book://Home/Index");
     //echo $index -> getName();
     //简便操作
     //R("[项目://][模块/]控制器/操作方法")
     //实例化对象之后再调用其对应的方法
     echo R("User/number");
     echo R("Admin/Goods/getMoney");
     //echo R("book://Home/Index/getName");
     $this->display();
 }
开发者ID:Yumum,项目名称:liyulin,代码行数:25,代码来源:GoodsController.class.php


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