本文整理汇总了PHP中full_url函数的典型用法代码示例。如果您正苦于以下问题:PHP full_url函数的具体用法?PHP full_url怎么用?PHP full_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了full_url函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: add
function add()
{
$input = array('username' => clear_all($_POST['username']), 'content' => clear_all($_POST['content']), 'pro_id' => intval($_GET['id']));
$this->db->insert_record($this->table, $input);
$this->db->alert(COMMENT_SUCCESS);
header_redirect(change_url(full_url()));
}
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:7,代码来源:class_comment_pro.php
示例2: geturl
function geturl()
{
$url = full_url();
if ($_GET['page']) {
$url = str_replace('&page=' . $_GET['page'], '', $url);
}
return $url;
}
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:8,代码来源:class_page.php
示例3: searchTerms
public static function searchTerms($url = null)
{
if (is_null($url)) {
$url = full_url();
}
// if(self::refererIsLocal($url)) return;
$arr = array();
parse_str(parse_url($url, PHP_URL_QUERY), $arr);
return isset($arr['q']) ? $arr['q'] : '';
}
开发者ID:469306621,项目名称:Languages,代码行数:10,代码来源:class.stats.php
示例4: embed_select_tab
/**
* Select the correct embed tab for display
*
* @param string $hook
* @param string $type
* @param array $items
* @param array $vars
*/
function embed_select_tab($hook, $type, $items, $vars)
{
$tab_name = array_pop(explode('/', full_url()));
foreach ($items as $item) {
if ($item->getName() == $tab_name) {
$item->setSelected();
elgg_set_config('embed_tab', $item);
}
}
if (!elgg_get_config('embed_tab') && count($items) > 0) {
$items[0]->setSelected();
elgg_set_config('embed_tab', $items[0]);
}
}
开发者ID:nachopavon,项目名称:Elgg,代码行数:22,代码来源:start.php
示例5: displayPage
/** Display the requested page. */
function displayPage($webPage)
{
setcookie("last-page", full_url($_SERVER));
/*if (isset($_SESSION["message"]))
{
$message = $_SESSION["message"];
$this->tpl->assign('message', $message);
unset($_SESSION["message"]);
}*/
$userPermissions = array("USER_VIEW");
// Use reflexion to get the web page class.
$className = $webPage . 'Page';
$phpFile = WEBAPP_DIR . 'pages/' . $webPage . '.php';
// Try to include (require_once) this PHP file.
try {
if (!file_exists($phpFile)) {
throw new Exception("Page file " . $phpFile . " doesn't exists!", 404);
}
require_once 'pages/' . $webPage . '.php';
if (!class_exists($className)) {
throw new Exception("Class '" . $className . "' doesn't exists!", 500);
}
$o = new $className();
$o->onCreate();
$hasPermissions = $o->hasPermissions($userPermissions);
if (!$hasPermissions) {
throw new Exception("Vous ne pouvez pas accéder à cette ressource", 403);
}
$this->tpl->assign("page", $webPage);
$o->process($this->tpl);
} catch (Exception $ex) {
// Build a basic template.
$this->tpl->assign("exception", $ex);
if ($ex->getCode() == 404) {
$this->tpl->display('404.tpl');
} else {
if ($ex->getCode() == 403) {
$this->tpl->display('404.tpl');
} else {
$this->tpl->display('500.tpl');
}
}
}
}
开发者ID:doubotis,项目名称:PHP-Blog,代码行数:45,代码来源:dispatcher.php
示例6: show_status
function show_status($input, $id = '', $other = '', $status = '', $top = '', $good = '')
{
if ($other != '') {
$other = '&special=1';
}
if ($top != '') {
$top = '&top=1';
}
if ($good != '') {
$good = '&good=1';
}
if ($status != '') {
$status = '&status=1';
}
if ($input == 1) {
return '<a href="' . full_url() . '&changestatus=' . $id . '&st=' . $input . $other . $top . $good . $status . '"><img width="16px" height="16px" src="images/tick.png" /></a>';
} else {
return '<a href="' . full_url() . '&changestatus=' . $id . '&st=' . $input . $other . $top . $good . $status . '"><img width="16px" height="16px" src="images/no-tick.png" /></a>';
}
}
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:20,代码来源:class_template.php
示例7: array
});
</script>
<?php
$category_id = $_REQUEST['category_id'];
$category_name = '{empty}';
$arr_offers = array();
if ($category_id > 0) {
$offers_stats_array = array();
$sql = "select id, category_caption, category_name, category_type from tbl_links_categories_list where id='" . mysql_real_escape_string($category_id) . "'";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
if ($row['id'] > 0) {
$category_name = $row['category_caption'];
} else {
// Category id not found
header("Location: " . full_url() . '?page=links');
exit;
}
switch ($row['category_type']) {
case 'network':
$page_type = 'network';
// Get network ID
$sql = "select id from tbl_cpa_networks where network_category_name='" . mysql_real_escape_string($row['category_name']) . "'";
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
$network_id = $row['id'];
// Get list of offers from network
$sql = "select * from tbl_offers where network_id='" . mysql_real_escape_string($network_id) . "' and status=0 order by date_add desc, id asc";
$result = mysql_query($sql);
while ($row = mysql_fetch_assoc($result)) {
$arr_offers[] = $row;
开发者ID:conversionstudio,项目名称:cpatracker,代码行数:31,代码来源:links_page.inc.php
示例8: date
$logline = date('Y-m-d H:i:s') . ' ' . $ip . ' ' . ': ' . print_r($msg, true) . "\n";
} else {
$logline = date('Y-m-d H:i:s') . ' ' . $ip . ' ' . ': ' . $msg . "\n";
}
error_log($logline, $type, $dest);
}
function my_handler($number, $message, $file, $line)
{
// jwg
// echo 'The following error occurred, allegedly on line ' . $line . ' of file ' . $file . ': ' . $message . ' <br/>';
// echo 'The existing variables are:' . print_r($GLOBALS, 1) . '';
wrtlog("ERROR EXIT: line {$line} of {$file} - {$message}");
echo '<div style="width:100%;textalign:center;"><table width="80%"><tr><td>There was an error processing your request. See log.</td></tr></table>';
exit;
}
$actual_link = full_url();
$need_trace = false;
if (version_compare(phpversion(), '5.4.0', '<')) {
if (session_id() == '') {
session_start();
} else {
$need_trace = true;
}
} else {
if (session_status() == PHP_SESSION_NONE) {
session_start();
} else {
$need_trace = true;
}
}
set_time_limit(0);
开发者ID:centaurustech,项目名称:base-system,代码行数:31,代码来源:config.php
示例9: create_session
create_session();
} else {
$debugtrace .= '<br>check2 success';
$session_data = json_decode($data, true);
}
}
if ($session_data['ip'] != $_SERVER['REMOTE_ADDR'] || $session_data['ua'] != substr($_SERVER['HTTP_USER_AGENT'], 0, 64)) {
$debugdata .= '<br>>>cs3 ip=' . ($session_data['ip'] != $_SERVER['REMOTE_ADDR'] ? 't' : 'f') . ' ua=' . ($session_data['ua'] != substr($_SERVER['HTTP_USER_AGENT'], 0, 64) ? 't' : 'f') . '(ipcomp=' . $session_data['ip'] . ' vs ' . $_SERVER['REMOTE_ADDR'] . ' | uacomp=' . $session_data['ua'] . ' vs ' . substr($_SERVER['HTTP_USER_AGENT'], 0, 64) . ' )';
$debugtrace .= '<br>check3 createonfail';
create_session();
} else {
$debugtrace .= '<br>check3 success';
save_session();
}
if (strlen($debugdata) > 0) {
$debugdata = '>>>Session Debug Start<<<<br><br>sessionname=' . $session_name . '<br>lifetime=' . $lifetime . '<br>path=' . $path . '<br>domain=' . $domain . '<br>secure=' . ($secure ? 't' : 'f') . '<br>httponly=' . ($httponly ? 't' : 'f') . '<br>hmacalgo=' . $hmac_algo . '<br>expire=' . $expire_time . '<br>sk=' . $sk . '<br>loginurl=' . $login_uri . '<br>uri=' . full_url($_SERVER) . '<br>sid=' . session_id() . '<br><br><pre>session=' . print_r($_SESSION, true) . '</pre><br><br><pre>sessiondata=' . print_r($session_data, true) . '</pre><br>' . $debugdata;
}
$debugtrace .= '<br>>>>TRACE END<<<';
if (!isset($session_data['loggedin'])) {
$debugdata .= '<br>>>notloggedin';
$session_data['loggedin'] = false;
}
if ($session_data['loggedin'] == false && substr($_SERVER['REQUEST_URI'], 0, strlen($login_uri)) != $login_uri) {
$debugdata .= '<br>>>redirect (uricomp=' . substr($_SERVER['REQUEST_URI'], 0, strlen($login_uri)) . ' vs ' . $login_uri . ')';
if ($session_debug === true) {
error_reporting($error_reporting_level);
restore_error_handler();
die($debugdata . '<br>' . $session_errors . '<br><br>' . $debugtrace . '<br>>>>Session Debug End<<<');
}
header("Location: {$login_url}");
die;
开发者ID:gmt2001,项目名称:PhantomPanel,代码行数:31,代码来源:session.php
示例10: error_reporting
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
include_once 'parser_api_utility.php';
$completeURL = full_url($_SERVER, true);
$serverName = $_SERVER['SERVER_NAME'];
/*is demo=true */
if (validateParams('demo')) {
$demo = TRUE;
} else {
$demo = FALSE;
}
/*is demo=true */
if (validateParams('embedded')) {
$embedded = TRUE;
} else {
$embedded = FALSE;
}
/* is API server specified? */
if (validateParams('server')) {
$server = $_REQUEST['server'];
if (strcmp($server, 'localhost') === 0) {
$server = $server . ':8080';
}
} else {
if ($demo) {
$server = "simfel.com";
} else {
$server = "communitylive.co";
}
开发者ID:sancraz,项目名称:communityexpress,代码行数:31,代码来源:preprocessing.php
示例11: define
}
} else {
define('CMS_SUBSITE', '');
define('INVALID_SUBSITE', FALSE);
}
// change the environment based on multisite
define('ENVIRONMENT', CMS_SUBSITE != '' ? 'site-' . CMS_SUBSITE : 'production');
}
// save the subsite to session
if (!isset($_SESSION)) {
session_start();
}
$_SESSION['__cms_subsite'] = CMS_SUBSITE;
// is subsite is invalid then redirect to the main website.
if (INVALID_SUBSITE || CMS_SUBSITE != '' && !is_dir('./' . $application_folder . '/config/site-' . CMS_SUBSITE)) {
$address = full_url($_SERVER);
var_dump($address);
// determine redirection url
if (USE_SUBDOMAIN) {
$address_part = explode('.', $address);
// get the protocol first
$protocol = $address_part[0];
$protocol_part = explode('://', $protocol);
$protocol = $protocol_part[0] . '://';
// remove subdomain
$address_part = array_slice($address_part, 1);
$address = implode('.', $address_part);
// add the protocol again
$address = $protocol . $address;
} else {
$address_part = explode('/', $address);
开发者ID:heruprambadi,项目名称:ci_webblog,代码行数:31,代码来源:index.php
示例12: preg_match
$image = preg_match('/(jpg|png|jpeg|gif)$/', $url);
$js = preg_match('/\\.js$/', $url);
$css = preg_match('/\\.css$/', $url);
if ($image) {
header("Content-Type: image/jpg");
}
if ($js) {
header("Content-Type: application/javascript");
}
if ($css) {
header("Content-Type: text/css");
}
/*********************************************************
* Proxy data
*********************************************************/
$proxy = full_url();
$proxyserv = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/rpi/p/';
/*********************************************************
* Query
*********************************************************/
$server = parse_url($url);
$hostproxify = $proxyserv . b64_encode($server['scheme'] . '://' . $server['host']);
$url = html_entity_decode($url);
if (!($content = http_proxy_query($url))) {
var_dump($_GET['url']);
var_dump($url);
var_dump($content);
}
$rewrite = !$image;
/*********************************************************
* Rewrite image & script urls
开发者ID:Reeska,项目名称:restinpi,代码行数:31,代码来源:index.php
示例13: searchresult
public function searchresult()
{
if (isset($_GET['location_id']) && $_GET['location_id'] != '') {
$city_id = $_GET['location_id'];
} else {
$city_id = '';
}
if (isset($_GET['retailer_id']) && $_GET['retailer_id'] != '') {
$retailer_id = $_GET['retailer_id'];
} else {
$retailer_id = '';
}
if (isset($_GET['pro_name']) && $_GET['pro_name'] != '') {
$product_name = $_GET['pro_name'];
} else {
$product_name = '';
}
//$search_data = array('city_id' => $city_id, 'retailer_id' => $retailer_id, 'product_name' => $product_name);
// $this->session->set_userdata($search_data);
$config['base_url'] = full_url();
$config['total_rows'] = $this->product_model->searh_form_total($city_id, $retailer_id, $product_name);
$config['prev_link'] = '< Föregående';
$config['next_link'] = 'Nästa >';
$config['per_page'] = 24;
$config['uri_segment'] = isset($_GET['per_page']) ? $_GET['per_page'] : 0;
$config['enable_query_strings'] = TRUE;
$config['page_query_string'] = TRUE;
$this->pagination->initialize($config);
$offset = $config['uri_segment'];
$limit = $config['per_page'];
$products = $this->product_model->searh_form($city_id, $retailer_id, $product_name, $limit, $offset);
$product_html = $this->create_product_html($products, 'searchpage');
//echo $product_html;
/*
$cat_id = 1416;
$data['category_name'] = get_categroy_name(149);
//$data['product_category'] = get_product_oncategory(149);
$data['product_category'] = '';
$data['other_choice'] = other_choice_category();
$data['related_categories'] = related_categories(149);
$data['sales_to_missed'] = sales_not_missed();
*/
$data['products'] = $product_html;
$data['total_records'] = $config['total_rows'];
$data['pagination'] = $this->pagination->create_links();
$this->template->load('responsive/default', 'responsive/category', $data);
//$this->output->enable_profiler(TRUE);
}
开发者ID:mrj0909,项目名称:sf,代码行数:48,代码来源:product.php
示例14: fullUrl
public function fullUrl($slug, $params = [])
{
return full_url($slug, $params);
}
开发者ID:pckg,项目名称:payment,代码行数:4,代码来源:Laravel.php
示例15: defined
<?php
defined('IN_CMS') or die('No direct access allowed.');
$home = is_postspage();
$url = isset($url) && !$home ? $url : article_url();
$title = isset($title) && !$home ? $title : article_title();
$time = isset($time) && !$home ? $time : article_time();
$excerpt = isset($excerpt) && !$home ? $excerpt : trim(article_description());
$excerpt = $excerpt == "" ? false : $excerpt;
$content = isset($content) && !$home ? $content : article_html();
$image = isset($image) && !$home ? $image : article_custom_field('img', false);
$isArticle = isset($isArticle) && $isArticle;
$uurl = urlencode(full_url());
$utitle = urlencode($title);
$tags = array("theme_url" => theme_url());
foreach ($tags as $s => $r) {
$content = str_replace("{" . $s . "}", $r, $content);
}
?>
<li class="<?php
if (isset($first) && $first) {
echo "showContent";
}
if (!$time) {
echo " noFooter";
}
echo is_single() ? " single" : " multiple";
?>
">
<header tabindex="-1">
<!--<a href="<?php
开发者ID:nathggns,项目名称:Light,代码行数:31,代码来源:template.php
示例16: elgg_extract
<?php
$list_id = elgg_extract('list_id', $vars);
$list_options = elgg_extract('list_options', $vars);
$getter_options = elgg_extract('getter_options', $vars);
$offset = abs((int) elgg_extract('offset', $getter_options, 0));
$offset_key = elgg_extract('offset_key', $list_options, 'offset');
$limit_key = elgg_extract('limit_key', $list_options, 'limit');
if (!($limit = (int) elgg_extract('limit', $getter_options, 10))) {
$limit = get_input($limit_key);
}
$count = (int) elgg_extract('count', $vars, 0);
$base_url = elgg_extract('base_url', $vars, full_url());
$base_url = hj_framework_http_remove_url_query_element($base_url, '__goto');
$num_pages = elgg_extract('num_pages', $vars, 5);
$delta = ceil($num_pages / 2);
if ($count <= $limit && $offset == 0) {
// no need for pagination
//return true;
} else {
$total_pages = ceil($count / $limit);
$current_page = ceil($offset / $limit) + 1;
$pages = new stdClass();
$pages->prev = array('text' => '« ' . elgg_echo('previous'), 'href' => '', 'is_trusted' => true);
$pages->next = array('text' => elgg_echo('next') . ' »', 'href' => '', 'is_trusted' => true);
$pages->items = array();
// Add pages before the current page
if ($current_page > 1) {
$prev_offset = $offset - $limit;
if ($prev_offset < 0) {
$prev_offset = 0;
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:31,代码来源:paginate.php
示例17: my_full_theme_url
function my_full_theme_url($file = '')
{
$theme_folder = Config::meta('theme');
$base = 'themes' . '/' . $theme_folder . '/';
return full_url($base . ltrim($file, '/'));
}
开发者ID:aravindanve,项目名称:anchor-maeby-light,代码行数:6,代码来源:functions.php
示例18: full_url
<?php
/**
* Adds metatags to load Javascript required for the profile
*
* @package ElggProfile
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Curverider Ltd <[email protected]>
* @copyright Curverider Ltd 2008-2009
* @link http://elgg.com/
*
*/
/*
* <script type="text/javascript" src="<?php echo $vars['url']; ?>pg/iconjs/profile.js" ></script>
*/
?>
<?php
if ($owner = page_owner_entity()) {
?>
<link rel="meta" type="application/rdf+xml" title="FOAF" href="<?php
echo full_url();
?>
?view=foaf" /><?php
}
?>
开发者ID:eokyere,项目名称:elgg,代码行数:26,代码来源:metatags.php
示例19: str_replace
} else {
$script = str_replace('view=xhr', 'view=default', $script);
}
$script = str_replace($lastcached_xhr, $lastcached_default, $script);
$resources['js'][] = html_entity_decode($script);
}
foreach ($css as $link) {
if (elgg_is_simplecache_enabled()) {
$link = str_replace('cache/css/xhr', 'cache/css/default', $link);
} else {
$link = str_replace('view=xhr', 'view=default', $link);
}
$link = str_replace($lastcached_xhr, $lastcached_default, $link);
$resources['css'][] = html_entity_decode($link);
}
$params = array('output' => $output, 'status' => 0, 'system_messages' => array('error' => array(), 'success' => array()), 'resources' => $resources, 'href' => full_url());
if (isset($system_messages['success']) && count($system_messages['success'])) {
$params['system_messages']['success'] = $system_messages['success'];
}
if (isset($system_messages['error']) && count($system_messages['error'])) {
$params['system_messages']['error'] = $system_messages['error'];
$params['status'] = -1;
}
$response = json_encode($params);
if (!get_input('X-PlainText-Response')) {
header("Content-type: application/json");
print $response;
} else {
print '<textarea>' . $response . '</textarea>';
// workaround for IE bugs
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:31,代码来源:default.php
示例20: foreach
<?php
foreach ($detailss as $key => $vdetail) {
foreach ($kolomm as $kkolomm) {
?>
<div class="form-group">
<label for="" class="col-sm-2 control-label"><p class="text-left"><?php
echo $kkolomm;
?>
</p></label>
<div class="col-sm-10">
<?php
switch ($kkolomm) {
case 'idimg':
?>
<a href="<?php
echo full_url() . '?img=' . $vdetail[$kkolomm];
?>
"><?php
echo geturl_img($vdetail[$kkolomm]);
?>
</a>
<?php
break;
default:
?>
<p class="form-control-static"><?php
echo $vdetail[$kkolomm];
?>
</p>
<?php
break;
开发者ID:akivaron,项目名称:toko,代码行数:31,代码来源:detail.php
注:本文中的full_url函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论