本文整理汇总了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('&', '&', 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');
示例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('&', '&', HTTP::query('reply', $response->id)) . '#' . $prefix . '-form" title="' . Config::speak($prefix . '_reply_to_', Text::parse($response->name_raw, '->text')) . '">' . $speak->reply . '</a>';
}
示例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');
示例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('&', '&', HTTP::query(array('path' => $___ ? implode('/', $___) : false, 'q' => false))), $t ? $t : '..');
}
?>
<td colspan="3"><?php
echo implode(' » ', array_reverse($__)) . ' » ' . 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 . '…'));
?>
</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>
示例5: __do_response_reply
function __do_response_reply($response)
{
global $config, $speak, $segment;
$q = str_replace('&', '&', 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);
}