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


PHP get_params函数代码示例

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


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

示例1: show_methods

function show_methods(Documenter $d, $type, $arr)
{
    echo "<h3>{$type}</h3>";
    foreach ($arr as $key => $value) {
        echo "<p><span class=\"keyword\">" . $d->getModifiers($value) . "</span> " . "<span class=\"name\">{$key}</span>\n";
        //Добавляем параметры используя метод из ReflectionMethod
        $params = $value->getParameters();
        $number = $value->getNumberOfParameters();
        $counter = 0;
        echo "( ";
        foreach ($params as $p) {
            echo get_params($p);
            $counter++;
            if ($counter != $number) {
                echo ", ";
            }
        }
        echo " )";
        if ($value->isUserDefined()) {
            echo " <span class=\"red\">пользовательский</span><br />";
        }
        if ($value->getDocComment()) {
            echo "<span class=\"comment\">";
            echo $value->getDocComment() . "</span><br />";
        }
        echo "</p>";
    }
}
开发者ID:ralf000,项目名称:PHP4,代码行数:28,代码来源:help.php

示例2: coverParams

 private function coverParams()
 {
     if (isset($this->params['cover']) === false) {
         $this->params['cover'] = get_params(Request::all(), 'forum_cover', ['forum_id:int', 'main_cover.cover_file:file', 'main_cover._delete:bool', 'default_topic_cover.cover_file:file', 'default_topic_cover._delete:bool']);
         $this->params['cover']['user_id'] = Auth::user()->user_id;
     }
     return $this->params['cover'];
 }
开发者ID:Hughp135,项目名称:osu-web,代码行数:8,代码来源:ForumCoversController.php

示例3: vote

 public function vote($id)
 {
     $discussion = BeatmapDiscussion::findOrFail($id);
     priv_check('BeatmapDiscussionVote', $discussion)->ensureCan();
     $params = get_params(Request::all(), 'beatmap_discussion_vote', ['score:int']);
     $params['user_id'] = Auth::user()->user_id;
     if ($discussion->vote($params)) {
         return $discussion->beatmapsetDiscussion->defaultJson(Auth::user());
     } else {
         return error_popup(trans('beatmaps.discussion-votes.update.error'));
     }
 }
开发者ID:ppy,项目名称:osu-web,代码行数:12,代码来源:BeatmapDiscussionsController.php

示例4: update

 public function update()
 {
     $customizationParams = get_params(Request::all(), 'user_profile_customization', ['extras_order:string[]']);
     $userParams = get_params(Request::all(), 'user', ['user_from:string', 'user_interests:string', 'user_msnm:string', 'user_occ:string', 'user_twitter:string', 'user_website:string']);
     if (count($customizationParams) > 0) {
         Auth::user()->profileCustomization()->update($customizationParams);
     }
     if (count($userParams) > 0) {
         Auth::user()->update($userParams);
     }
     return Auth::user()->defaultJson();
 }
开发者ID:ppy,项目名称:osu-web,代码行数:12,代码来源:AccountController.php

示例5: get_params

<?php

$show = get_params('shows', $attr);
$list = $this->db->result("SELECT * FROM weblink WHERE published = 1 ORDER BY id DESC");
if ($show == 1) {
    ?>
<select name="" style="width: 99%;">
    <?php 
    foreach ($list as $rs) {
        ?>
    <option onclick="window.open('<?php 
        echo $rs->link;
        ?>
');"><?php 
        echo $rs->name;
        ?>
</option>
    <?php 
    }
    ?>
</select>   
<?php 
} else {
    ?>
    <?php 
    foreach ($list as $rs) {
        ?>
        <div><a href="<?php 
        echo $rs->link;
        ?>
" target="_blank"><?php 
开发者ID:VoDongMy,项目名称:VoDongMy,代码行数:31,代码来源:index.php

示例6: handle_error

 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
include 'config.php';
function handle_error($status = '404 Not Found', $header, $text)
{
    global $config;
    header('HTTP/1.0 ' . $status);
    header('Status: ' . $status);
    do_header();
    echo '<h3>' . $header . '</h3>';
    echo '<p class="warning">Sorry :-(</p>';
    echo '<p>' . $text . '</p>';
    echo '<p class="leave"><a href="' . $config['base'] . '">Go to ' . $config['shortener'] . '</a></p>';
    do_footer();
    die;
}
$short = get_params($_SERVER['PATH_INFO']);
$short_url = clean($short[0]);
if (empty($short_url)) {
    go_to('/');
}
$query = mysql_query("SELECT long_url, status FROM urls WHERE short_url = CONVERT('{$short_url}' USING binary) LIMIT 1");
$result = mysql_fetch_row($query, MYSQL_ASSOC);
if (empty($result)) {
    handle_error('404 Not Found', 'Not Found', 'We couldn\'t find that URL.');
}
if ($result['status'] == 'suspended') {
    handle_error('403 Forbidden', 'Suspended URL', 'This URL has been suspended.');
}
$long_url = $result['long_url'];
go_to($long_url);
开发者ID:neiko,项目名称:nsamblr,代码行数:31,代码来源:go.php

示例7: foreach

    }
    // apply defaults for missing parameters
    if ($defaults) {
        foreach ($defaults as $k => $v) {
            if (!isset($ret[$k])) {
                $ret[$k] = $v;
            }
        }
    }
    if ($overwrite) {
        $_REQUEST = $ret;
    }
    return $ret;
}
// Example: page.php?style=modern
$argv = get_params(array('id' => 42, 'style' => 'medieval'));
// $argv['id'] = 42
// $argv['style'] = 'modern'
// url maker function, remove duplicated vars
// exemple
// makeUrl('index.php', $_SERVER['QUERY_STRING'], 'name=value&name2=value2');
function makeUrl($path, $qs = false, $qsAdd = false)
{
    $var_array = array();
    $varAdd_array = array();
    $url = $path;
    if ($qsAdd) {
        $varAdd = explode('&', $qsAdd);
        foreach ($varAdd as $varOne) {
            $name_value = explode('=', $varOne);
            $varAdd_array[$name_value[0]] = $name_value[1];
开发者ID:shameerariff,项目名称:gpsapps,代码行数:31,代码来源:urlMaker.php

示例8: postParams

 private function postParams($isNew = true)
 {
     $params = get_params(Request::all(), 'beatmap_discussion_post', ['message']);
     $params['last_editor_id'] = Auth::user()->user_id;
     if ($isNew) {
         $params['user_id'] = Auth::user()->user_id;
     }
     return $params;
 }
开发者ID:ppy,项目名称:osu-web,代码行数:9,代码来源:BeatmapDiscussionPostsController.php

示例9: __

                            <br><br>
                            <a href="index.php?setlang=de"><img src="images/flags/de.png" border=0></a>&nbsp;<a
                                href="index.php?setlang=en"><img src="images/flags/gb.png" border=0></a>&nbsp;<a
                                href="index.php?setlang=ru"><img src="images/flags/ru.png" border=0></a>
                            <br><br>
                            <input type="submit" value="&nbsp;&nbsp;<?php 
    echo __('Войти');
    ?>
&nbsp;&nbsp;"/>
                        </form>
                    </div>
                </center>
                <?php 
} else {
    define("user_id", $iUsrId);
    if (get_params($sModule, 'show_to_user')) {
        if (!($sPath = get_module($sModule))) {
            echo '<br><br><br><br><center>' . __('Ошибка: модуль не подключен') . '</center><br><br><br><br>';
        } else {
            include $sPath;
        }
    } else {
        echo '<br><br><br><br><center>' . __('Ошибка: недостаточно прав') . '</center><br><br><br><br>';
    }
}
?>

        </div>
    </article>
    <footer>
        <div class="foot_logo">
开发者ID:kipkaev55,项目名称:asterisk,代码行数:31,代码来源:index.php

示例10: get_params

<?php

require_once '../data/qcew_data.php';
$parms = get_params(array('stfips' => '41', 'areatype' => '01', 'area' => '000000', 'periodyear' => '1999', 'periodtype' => '02', 'period' => '01', 'servicetype' => 'data'));
$qcewdao = new IndustryDAO();
echo json_encode($qcewdao->getQCEWQuarter($parms['stfips'], $parms['areatype'], $parms['area'], $parms['periodyear'], $parms['periodtype'], $parms['period']));
开发者ID:jfpearce,项目名称:arc-tools,代码行数:6,代码来源:qcew_service.php

示例11: values

    if ($pages < $page) {
        $page = 1;
    }
    $cdr_query = "SELECT channel, calldate, userfield, src, dst, duration, billsec, lastapp, lastdata, uniqueid, randdata, disposition, dstchannel, dcontext, status FROM " . $conf_cdr_db . ".cdr WHERE" . $cdr_restr . $usr_restr . " ORDER BY " . $sort . " LIMIT " . ($page - 1) * $perpage . ", " . $perpage;
    $result_set = values($cdr_query);
    //echo $conf_cdr_db;
    if ($cal_num > 0) {
        $pstring = '';
        for ($i = 0; $i < $pages; $i++) {
            if ($i + 1 == $page) {
                $pstring .= '<b>[' . ($i + 1) . ']</b> ';
            } else {
                $pstring .= '<a href="' . change_link_param($aLinkParams, 'page', $i + 1) . '">' . ($i + 1) . '</a> ';
            }
        }
        if (get_params('statistic', "show_name_in_stat")) {
            $show_name = 1;
        } else {
            $show_name = 0;
        }
        ?>
        <center><br>
            <?php 
        echo __('Найдено записей');
        ?>
: <?php 
        echo $cal_num;
        ?>
            ; <?php 
        echo __('Общая продолжительность звонков');
        ?>
开发者ID:kipkaev55,项目名称:asterisk,代码行数:31,代码来源:statistic.php

示例12: check_function

/** run tests on a function. the code is passed in $txt */
function check_function($name, $txt, $offset)
{
    global $API_params;
    $regex = '/
		(?: zend_parse_parameters(?:_throw)?               \\s*\\([^,]+
		|   zend_parse_(?:parameters_ex|method_parameters) \\s*\\([^,]+,[^,]+
		|   zend_parse_method_parameters_ex                \\s*\\([^,]+,[^,]+,[^,+]
		)
		,\\s*"([^"]*)"\\s*
		,\\s*([^{;]*)
	/Sx';
    if (preg_match_all($regex, $txt, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) {
        $GLOBALS['current_function'] = $name;
        foreach ($matches as $m) {
            $GLOBALS['error_few_vars_given'] = false;
            update_lineno($offset + $m[2][1]);
            $vars = get_vars(substr($txt, 0, $m[0][1]));
            // limit var search to current location
            $params = get_params($vars, $m[2][0]);
            $optional = $varargs = false;
            $last_char = '';
            $j = -1;
            $spec = $m[1][0];
            $len = strlen($spec);
            for ($i = 0; $i < $len; ++$i) {
                $char = $spec[$i];
                switch ($char = $spec[$i]) {
                    // separator for optional parameters
                    case '|':
                        if ($optional) {
                            error("more than one optional separator at char #{$i}");
                        } else {
                            $optional = true;
                            if ($i == $len - 1) {
                                error("unnecessary optional separator");
                            }
                        }
                        break;
                        // separate_zval_if_not_ref
                    // separate_zval_if_not_ref
                    case '/':
                        if (in_array($last_char, array('l', 'L', 'd', 'b'))) {
                            error("the '/' specifier should not be applied to '{$last_char}'");
                        }
                        break;
                        // nullable arguments
                    // nullable arguments
                    case '!':
                        if (in_array($last_char, array('l', 'L', 'd', 'b'))) {
                            check_param($params, ++$j, 'zend_bool*', $optional);
                        }
                        break;
                        // variadic arguments
                    // variadic arguments
                    case '+':
                    case '*':
                        if ($varargs) {
                            error("A varargs specifier can only be used once. repeated char at column {$i}");
                        } else {
                            check_param($params, ++$j, 'zval**', $optional);
                            check_param($params, ++$j, 'int*', $optional);
                            $varargs = true;
                        }
                        break;
                    case 's':
                    case 'p':
                        check_param($params, ++$j, 'char**', $optional, $allow_uninit = true);
                        check_param($params, ++$j, 'size_t*', $optional, $allow_uninit = true);
                        if ($optional && !$params[$j - 1][2] && !$params[$j][2] && $params[$j - 1][0] !== '**dummy**' && $params[$j][0] !== '**dummy**') {
                            error("one of optional vars {$params[$j - 1][0]} or {$params[$j][0]} must be initialized", 1);
                        }
                        break;
                    case 'C':
                        // C must always be initialized, independently of whether it's optional
                        check_param($params, ++$j, 'zend_class_entry**', false);
                        break;
                    default:
                        if (!isset($API_params[$char])) {
                            error("unknown char ('{$char}') at column {$i}");
                        }
                        // If an is_null flag is in use, only that flag is required to be
                        // initialized
                        $allow_uninit = $i + 1 < $len && $spec[$i + 1] === '!' && in_array($char, array('l', 'L', 'd', 'b'));
                        foreach ($API_params[$char] as $exp) {
                            check_param($params, ++$j, $exp, $optional, $allow_uninit);
                        }
                }
                $last_char = $char;
            }
        }
    }
}
开发者ID:cefalo19,项目名称:php-src,代码行数:93,代码来源:check_parameters.php

示例13: get_params

<?php

require_once '../data/employer_data.php';
// Create parameterized query for empdb table
$parms = get_params(array('stfips' => '41', 'areatype' => '04', 'area' => '000000', 'zipcode' => '', 'naicscode' => '000000', 'sizeclass' => '9', 'annsalrng' => 'X', 'search' => '', 'page' => '1', 'rows' => '25', 'sord' => 'asc', 'sidx' => 'name'));
$empdao = new EmployerDAO();
header('Content-type: text/xml');
echo $empdao->getEmployerData($parms['stfips'], $parms['areatype'], $parms['area'], $parms['zipcode'], $parms['naicscode'], $parms['sizeclass'], $parms['annsalrng'], $parms['search'], $parms['page'], $parms['rows'], $parms['sord'], $parms['sidx']);
开发者ID:jfpearce,项目名称:arc-tools,代码行数:8,代码来源:employer_service.php

示例14: get_params

<?php

require_once '../data/income.php';
$parms = get_params(array('stfips' => '41', 'areatype' => '01', 'area' => '000000', 'incsource' => 'incsource', 'inctype' => 'incstype'));
$incdao = new IncomeDAO();
echo json_encode($incdao->getList($parms['stfips'], $parms['areatype'], $parms['area'], '3', $parms['inctype']));
开发者ID:jfpearce,项目名称:arc-tools,代码行数:6,代码来源:incservice.php

示例15: get_url

        $output .= "<td colspan=2 style='padding-top:2px; padding-bottom:3px'>";
        $output .= "\n\t\t<table class='rubriki' border=0>\n\t\t<tr>\n\t\t\t<td class='pic' valign='top'>\n\t\t\t\t<img src='shortimage.php?x=70&y=70&path=attachments/" . $products[$i][id] . "/big.jpg' border='0'>\n\t\t\t</td>\n\t\t\t<td valign='top'>\n\t\t\t\t<table class='podrubriki' border=0>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='left'>\n\t\t\t\t\t\t<a class='title3' href='" . get_url("/catalog.php?id=" . $products[$i][id]) . "'>" . $products[$i][name] . "</a>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t" . get_params($products[$i][id]) . "\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t";
        $output .= "</td class='center1'>";
        $output .= "</tr>";
    }
    if (count($products) % 2 != 0) {
        $output .= "<td class='center1'></td></tr>";
    }
}
if ($show == "table") {
    for ($i = 0; $i < count($products); $i++) {
        if ($i % 2 == 0) {
            $output .= "<tr>";
        }
        $output .= "<td class='center1'>";
        $output .= "\n\t\t<table class='rubriki' border=0>\n\t\t<tr>\n\t\t\t<td class='pic' valign='top'>\n\t\t\t\t<img src='images/pic.jpg' height='35' width='35' border='0'>\n\t\t\t</td>\n\t\t\t<td valign='top'>\n\t\t\t\t<table class='podrubriki' border=0>\n\t\t\t\t<tr>\n\t\t\t\t\t<td align='left'>\n\t\t\t\t\t\t<a class='title3' href='" . get_url("/catalog.php?id=" . $products[$i][id]) . "'>" . $products[$i][name] . "</a>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t" . get_params($products[$i][id]) . "\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t";
        $output .= "</td class='center1'>";
        if ($i % 2 != 0) {
            $output .= "</tr>";
        }
    }
    if (count($products) % 2 != 0) {
        $output .= "<td class='center1'></td></tr>";
    }
}
if ($show == "compare") {
    if ($_POST[compare]) {
        $output = "\n\t\t<tr>\n\t\t\t<td colspan=2>\n\t\t\t\t<table border=0 width=100%>\n\t\t";
        $product_id = array();
        $product_id = $_POST[product_id];
        $where = "";
开发者ID:pioytazsko,项目名称:drell,代码行数:31,代码来源:_products_list.php


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