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


PHP HTTP::query方法代码示例

本文整理汇总了PHP中HTTP::query方法的典型用法代码示例。如果您正苦于以下问题:PHP HTTP::query方法的具体用法?PHP HTTP::query怎么用?PHP HTTP::query使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HTTP的用法示例。


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

示例1: array

            $deletes = array($name);
        }
    }
    Config::set(array('page_title' => $speak->deleting . ': ' . (count($deletes) === 1 ? File::B($name) : $speak->assets) . $config->title_separator . $config->manager->title, 'cargo' => 'kill.asset.php'));
    if ($request = Request::post()) {
        Guardian::checkToken($request['token']);
        $info_path = Mecha::walk($deletes, function ($v) {
            $_path = ASSET . DS . $v;
            File::open($_path)->delete();
            return $_path;
        });
        $is_folder_or_file = count($deletes) === 1 && is_dir(ASSET . DS . $deletes[0]) ? 'folder' : 'file';
        $P = array('data' => array('files' => $info_path));
        Notify::success(Config::speak('notify_' . $is_folder_or_file . '_deleted', '<code>' . implode('</code>, <code>', $deletes) . '</code>'));
        Weapon::fire(array('on_asset_update', 'on_asset_destruct'), array($P, $P));
        Guardian::kick($config->manager->slug . '/asset/1' . str_replace('&', '&amp;', HTTP::query('path', $p)));
    } else {
        Notify::warning(count($deletes) === 1 ? Config::speak('notify_confirm_delete_', '<code>' . File::path($name) . '</code>') : $speak->notify_confirm_delete);
    }
    Shield::lot(array('segment' => 'asset', 'files' => Mecha::O($deletes)))->attach('manager');
});
/**
 * Multiple Asset Action
 * ---------------------
 */
Route::accept($config->manager->slug . '/asset/do', function ($path = "") use($config, $speak) {
    if ($request = Request::post()) {
        Guardian::checkToken($request['token']);
        if (!isset($request['selected'])) {
            Notify::error($speak->notify_error_no_files_selected);
            Guardian::kick($config->manager->slug . '/asset/1');
开发者ID:yiannisSt,项目名称:mecha-cms,代码行数:31,代码来源:route.asset.php

示例2: do_response_reply

 function do_response_reply($response)
 {
     global $speak;
     $prefix = File::B(File::D($response->path));
     echo (Weapon::exist($prefix . '_footer') && Guardian::happy() ? ' / ' : "") . '<a class="a-reply" data-parent="' . $response->id . '" href="' . str_replace('&', '&amp;', HTTP::query('reply', $response->id)) . '#' . $prefix . '-form" title="' . Config::speak($prefix . '_reply_to_', Text::parse($response->name_raw, '->text')) . '">' . $speak->reply . '</a>';
 }
开发者ID:tovic,项目名称:comment-reply-plugin-for-mecha-cms,代码行数:6,代码来源:task.comment.reply.php

示例3: array_shift

    // Create proper query string data
    if ($path !== "") {
        array_shift($_GET);
    }
    // Loading the language file(s)
    $lang = LANGUAGE . DS . 'en_US' . DS . 'speak.txt';
    $lang_a = LANGUAGE . DS . $config['language'] . DS . 'speak.txt';
    if (!file_exists($lang) && !file_exists($lang_a)) {
        Guardian::abort('Language file not found.');
    }
    $lang = Text::toArray(File::open($lang)->read(""), S, '  ');
    if ($config['language'] !== 'en_US') {
        $lang_a = Text::toArray(File::open($lang_a)->read(""), S, '  ');
        Mecha::extend($lang, $lang_a);
    }
    $config['query'] = $config['url_query'] = HTTP::query($_GET);
    $config['offset'] = isset($s[1]) && is_numeric($s[1]) ? (int) $s[1] : 1;
    $config['page_type'] = $page;
    $config['speak'] = $lang;
    $config['is'] = array('post' => $page !== '404' && Mecha::walk(glob(POST . DS . '*', GLOB_NOSORT | GLOB_ONLYDIR))->has(POST . DS . $page), 'posts' => Mecha::walk(array('index', 'tag', 'archive', 'search', ""))->has($page), 'response' => false, 'responses' => false);
    unset($ss, $s, $lang, $lang_a);
    Config::set($config);
});
/**
 * =============================================================
 *  GET LANGUAGE FILE TO SPEAK
 * =============================================================
 *
 * -- CODE: ----------------------------------------------------
 *
 *    echo Config::speak('home');
开发者ID:yiannisSt,项目名称:mecha-cms,代码行数:31,代码来源:config.php

示例4: array

    }
    ?>
            <?php 
}
?>
            <?php 
if ($q_path) {
    ?>
            <tr>
              <?php 
    $__ = array();
    $___ = explode('/', $q_path);
    foreach ($___ as $_) {
        array_pop($___);
        $t = end($___);
        $__[] = Cell::a($asset_url . '/1' . str_replace('&', '&amp', HTTP::query(array('path' => $___ ? implode('/', $___) : false, 'q' => false))), $t ? $t : '..');
    }
    ?>
              <td colspan="3"><?php 
    echo implode(' &raquo; ', array_reverse($__)) . ' &raquo; ' . File::B($q_path);
    ?>
</td>
              <td class="td-icon"><?php 
    echo Jot::a('accept', $config->url_path . $q_path_parent_, Jot::icon('folder-open'), array('title' => $speak->exit . '&hellip;'));
    ?>
</td>
              <td class="td-icon"><?php 
    echo Jot::a('destruct', $asset_url_kill . $q_path . $q_path_parent_, Jot::icon('times'), array('title' => $speak->delete));
    ?>
</td>
            </tr>
开发者ID:yiannisSt,项目名称:mecha-cms,代码行数:31,代码来源:cargo.asset.php

示例5: __do_response_reply

function __do_response_reply($response)
{
    global $config, $speak, $segment;
    $q = str_replace('&', '&amp;', HTTP::query(array('parent' => $response->id, 'post' => $response->post)));
    echo (Weapon::exist($segment[0] . '_footer') ? ' / ' : "") . Cell::a($config->manager->slug . '/' . $segment[0] . '/ignite' . $q, $speak->reply);
}
开发者ID:tovic,项目名称:comment-reply-plugin-for-mecha-cms,代码行数:6,代码来源:__launch.php


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