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


PHP input函数代码示例

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


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

示例1: __construct

 public function __construct()
 {
     parent::__construct();
     if (self::$_saved === null) {
         self::$_saved = false;
     }
     if (self::$_need_save === null) {
         self::$_need_save = false;
     }
     $tmp = input()->cookie();
     if (array_count($tmp) > 0) {
         if (array_key_isset('PHPSESSID', $tmp)) {
             unset($tmp['PHPSESSID']);
         }
         if (array_count($tmp) > 0) {
             foreach ($tmp as $key => $val) {
                 if (is_varible_name($key)) {
                     if ($val != '') {
                         $this->_properties[$key] = unserialize(@gzuncompress(base64_decode($val)));
                     } else {
                         $this->_properties[$key] = '';
                     }
                 }
             }
         }
     }
     unset($tmp);
 }
开发者ID:cruide,项目名称:wasp,代码行数:28,代码来源:cookie.php

示例2: msqmerge_menu

function msqmerge_menu($p, $o, $rid)
{
    $p = $p ? $p : msqmerge_default();
    $ret = input(1, 'inp', $p, '') . ' ';
    $ret .= lj('', $rid . '_plug__2_msqmerge_msqmerge*j___inp', picto('reload')) . ' ';
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:7,代码来源:msqmerge.php

示例3: setting

 /**
  * 配置会员整合插件
  */
 public function setting()
 {
     if (IS_POST) {
         $code = input('post.code', 'trim');
         $mod = passport::uc($code);
         $info = $mod->get_info();
         foreach ($info['config'] as $key => $val) {
             $config[$key] = input('post.' . $key);
         }
         $config = serialize($config);
         //保存到配置表
         D('setting')->where(array('name' => 'integrate_code'))->setField('data', $code);
         D('setting')->where(array('name' => 'integrate_config'))->setField('data', $config);
         $this->success(L('operation_success'), U('integrate/index'));
     } else {
         $code = input('get.code', 'trim');
         $mod = passport::uc($code);
         //获取配置项
         $info = $mod->get_info();
         $this->assign('info', $info);
         //获取配置值
         $this->assign('icv', C('pin_integrate_config'));
         $this->display();
     }
 }
开发者ID:bgp1984,项目名称:WeixinShop,代码行数:28,代码来源:IntegrateAction.class.php

示例4: display

 function display()
 {
     // Viewprofile
     if (input(1) && is_numeric(input(1))) {
         return $this->show_user();
     }
     // Action
     if (!user('logged')) {
         // Try to login
         if (input(1, 'login')) {
             return $this->login();
         }
     }
     if (user('logged') && input(1, 'logout')) {
         // Try to log-out
         return $this->logout();
     }
     # Final checks
     if (user('logged')) {
         #$GLOBALS['input'] = array ('user','profile','cnt');
         #return $this->profile ();
     } else {
         return $this->login();
     }
     // Else?
     @header('Location: ' . URL);
     exit;
 }
开发者ID:petrows,项目名称:Upload-service,代码行数:28,代码来源:mod_user.php

示例5: prepareVars

 /**
  * Prepares the form widget view data
  */
 public function prepareVars()
 {
     $sessionKey = input('sessionKey') ?: $this->sessionKey;
     $product = $this->model->product_id ? Product::findOrNew($this->model->product_id) : new Product();
     $this->vars['selectionIds'] = $this->model->selections()->lists('id');
     $this->vars['options'] = $product->options()->withDeferred($sessionKey)->get();
 }
开发者ID:scottbedard,项目名称:oc-shop-plugin,代码行数:10,代码来源:OptionPicker.php

示例6: setconfig

 /**
  * 设置路由
  */
 private function setconfig()
 {
     $route_config = get_config('route_config', 'default');
     $this->_m = input('m') ? input('m') : $route_config['m'];
     $this->_f = input('f') ? input('f') : $route_config['f'];
     $this->_v = input('v') ? strip_tags(input('v')) : $route_config['v'];
 }
开发者ID:another3000,项目名称:wuzhicms,代码行数:10,代码来源:application.class.php

示例7: index

 /**
  * 模板列表
  */
 public function index()
 {
     $config_file = APP_PATH . 'Home/Conf/config.php';
     $config = (include $config_file);
     if ($dirname = input('get.dirname', 'trim')) {
         //写入配置文件
         $config['DEFAULT_THEME'] = $dirname;
         file_put_contents($config_file, "<?php \nreturn " . var_export($config, true) . ";", LOCK_EX);
         $obj_dir = new \Common\ORG\Dir();
         is_dir(CACHE_PATH . 'Home/') && $obj_dir->delDir(CACHE_PATH . 'Home/');
         @unlink(RUNTIME_FILE);
     }
     $tpl_dir = APP_PATH . 'Home/View/';
     $opdir = dir($tpl_dir);
     $template_list = array();
     while (false !== ($entry = $opdir->read())) {
         if ($entry[0] == '.') {
             continue;
         }
         if (!is_file($tpl_dir . $entry . '/info.php')) {
             continue;
         }
         $info = (include_once $tpl_dir . $entry . '/info.php');
         $info['preview'] = basename(APP_PATH) . '/Home/View/' . $entry . '/preview.gif';
         $info['dirname'] = $entry;
         $template_list[$entry] = $info;
     }
     $this->assign('template_list', $template_list);
     //当前使用的模板
     $this->assign('def_tpl', $config['DEFAULT_THEME']);
     $this->display();
 }
开发者ID:bgp1984,项目名称:WeixinShop,代码行数:35,代码来源:TemplateAction.class.php

示例8: _search

 protected function _search()
 {
     $map = array();
     ($keyword = input('request.keyword', 'trim')) && ($map['name'] = array('like', '%' . $keyword . '%'));
     $this->assign('search', array('keyword' => $keyword));
     return $map;
 }
开发者ID:bgp1984,项目名称:WeixinShop,代码行数:7,代码来源:IpbanAction.class.php

示例9: geturl

function geturl($pfad)
{
    global $links;
    $r = split("/", trim($pfad, "/"));
    $in = input($links[$r[2]]['url']);
    return dlflv($in[$r[3]]['url']);
}
开发者ID:BackupTheBerlios,项目名称:onlinestreams-svn,代码行数:7,代码来源:Kabeleins.de.php

示例10: pestle_cli

/**
* Short Description
* Long
* Description
* @command check_registration
*/
function pestle_cli($argv)
{
    $path = 'app/code';
    if (count($argv) > 0) {
        $Path = $argv[0];
    }
    foreach (glob($path . '/*/*') as $file) {
        $parts = explode('/', $file);
        $module = implode('_', array_slice($parts, count($parts) - 2));
        $file = $file . '/' . 'registration.php';
        if (file_exists($file)) {
            output("Registration Exists");
            $contents = file_get_contents($file);
            if (strpos($contents, "'" . $module . "'") !== false) {
                output("Registration contains {$module} string");
                continue;
            }
            output("However, it's missing single quoted '{$module}' string");
            output("");
            continue;
        }
        output("No {$file}");
        $answer = input("Create? [Y/n]", 'n');
        if ($answer !== 'Y') {
            continue;
        }
        file_put_contents($file, templateRegistrationPhp($module));
        output("Created {$file}");
        output("");
    }
}
开发者ID:benmarks,项目名称:pestle,代码行数:37,代码来源:module.php

示例11: ossn_js_page_handler

function ossn_js_page_handler($pages)
{
    switch ($pages[0]) {
        case 'boot':
            if (!ossn_isLoggedIn()) {
                ossn_error_page();
            }
            if (isset($pages[1]) && $pages[1] == 'ossn.boot.chat.js') {
                header('Content-Type: application/javascript');
                echo ossn_plugin_view('js/OssnChat.Boot');
            }
            break;
        case 'selectfriend':
            $user = input('user');
            if (!empty($user)) {
                $user = ossn_user_by_guid($user);
                OssnChat::setUserChatSession($user);
                $friend['user'] = $user;
                echo ossn_plugin_view('chat/selectfriend', $friend);
            }
            break;
        default:
            ossn_error_page();
            break;
    }
}
开发者ID:nongdanit-nongdanit,项目名称:ossn,代码行数:26,代码来源:ossn_com.php

示例12: log

 public function log()
 {
     $zp = M('zhuanpan_list');
     $useracc = M('zhuanpan_log');
     if ($keyword = input('request.keyword', 'trim')) {
         $map['_string'] = "username like '%" . $keyword . "%' ";
     }
     $map['listid'] = array('lt', 7);
     $count = $useracc->where($map)->count();
     // 查询满足要求的总记录数 $map表示查询条件
     $Page = new \Common\ORG\Page($count);
     // 实例化分页类 传入总记录数
     $show = $Page->show();
     // 分页显示输出
     // 进行分页数据查询
     $list = $useracc->where($map)->order('id desc')->limit($Page->firstRow . ',' . $Page->listRows)->select();
     foreach ($list as $key => $val) {
         $listid = $val['listid'];
         $listinfo = $zp->where("id={$listid}")->find();
         $list[$key]['jp_leibei'] = $listinfo['praisename'];
         $list[$key]['jp_name'] = $listinfo['praisecontent'];
     }
     $this->assign('list', $list);
     // 赋值数据集
     $this->assign('page', $show);
     // 赋值分页输出
     $this->display();
 }
开发者ID:bgp1984,项目名称:WeixinShop,代码行数:28,代码来源:ZhuanpanAction.class.php

示例13: getArticle

 public function getArticle()
 {
     header('Content-type: application/json');
     $_out = array('status' => 'error', 'msg' => '参数错误!', 'eo' => '0');
     $keygen = input('keygen');
     $token = input('token');
     if ($keygen == '19890110001aFk5' && $token == 'yjmhntgbYyhGTByjghTG45H') {
         $limit = input('limit') ? input('limit') : 20;
         $order = input('order') ? input('order') : '';
         $configs = array('date' => input('date') ? input('order') : '', 'cid' => 4, 'has_pic' => input('has_pic') ? input('has_pic') : 0);
         $where = $this->_getWhere($configs);
         $sql = 'select * from task_contents ' . $where . 'order by created_time desc ' . 'limit ' . $limit;
         $data = get_data($sql);
         if (!empty($data)) {
             foreach ($data as $v) {
                 $_list[] = array('id' => $v['id'], 'title' => $v['title'], 'keywords' => $v['keywords'], 'description' => $v['description'], 'image' => $v['pic'], 'content' => $v['content'], 'hash' => $v['url_hash'], 'utc_time' => $v['created_time']);
             }
             $_out['list_data'] = $_list;
             $_out['status'] = 'success';
             $_out['msg'] = '成功获取数据';
         } else {
             $_out['msg'] = '暂无数据';
         }
     } else {
         $_out['msg'] = '验证错误';
     }
     echo json_encode($_out, true);
 }
开发者ID:boxcore,项目名称:xspider,代码行数:28,代码来源:ApiControl.php

示例14: all

 /**
  * Get all books
  * if no limit specified, a default number 50 is filtered
  *
  * @return \Illuminate\Database\Eloquent\Collection|static[]
  */
 public function all()
 {
     $limit = input('limit', 50);
     $books = Book::all()->take($limit);
     event(new ExampleEvent());
     return $books;
 }
开发者ID:aphiwadChhoeun,项目名称:Book-API,代码行数:13,代码来源:BookController.php

示例15: validateCaptcha

 /**
  * Validate Captcha
  * @param $request
  * @return bool
  */
 private function validateCaptcha(Request $request)
 {
     // validate google captcha
     $recaptcha = new ReCaptcha(env('RECAPTCHA_PRIVATE_KEY'));
     $response = $recaptcha->verify(input('g-recaptcha-response'), $request->getClientIp());
     return $response;
 }
开发者ID:bpocallaghan,项目名称:titan,代码行数:12,代码来源:GoogleCaptcha.php


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