本文整理汇总了PHP中get_protocol函数的典型用法代码示例。如果您正苦于以下问题:PHP get_protocol函数的具体用法?PHP get_protocol怎么用?PHP get_protocol使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_protocol函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: documentationPage
function documentationPage($page = null)
{
global $app;
$wiki = new RemWiki\RemWiki(get_protocol() . 'lmms.io/wiki/');
if ($page === null or $page === '') {
$page = 'Main_Page';
}
$json = $wiki->parse($page);
return $app['twig']->render('documentation.twig', ['json' => $json, 'text' => $json['text']['*']]);
}
示例2: get_base_url
/**
* get_base_url
* return the path to folder
*/
function get_base_url($dropqs = true)
{
// $site_base_url = get_protocol().$_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']);
// if( $site_base_url[strlen($site_base_url)-1] != '/' )
// $site_base_url.="/";
$site_base_url = sprintf('%s%s%s', get_protocol(), $_SERVER['SERVER_NAME'], dirname($_SERVER['REQUEST_URI']) . '/');
$parts = parse_url($site_base_url);
$port = $_SERVER['SERVER_PORT'];
$scheme = $parts['scheme'];
$host = $parts['host'];
$path = @$parts['path'];
$qs = @$parts['query'];
$port or $port = $scheme == 'https' ? '443' : '80';
if ($scheme == 'https' && $port != '443' || $scheme == 'http' && $port != '80') {
$host = "{$host}:{$port}";
}
$url = "{$scheme}://{$host}{$path}";
if (!$dropqs) {
return "{$url}?{$qs}";
} else {
return $url;
}
}
示例3: base_url
<div class="col-sm-8 col-xs-12" style="padding-left: 0;">
<table width="100%">
<tbody>
<tr>
<td><b style="font-size: 25px;line-height: 94px;color:#545454" class="mainhead">Flight Reservation</b></td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-4 col-xs-12">
<table width="100%">
<tbody>
<tr>
<td><b style="font-size:24px;"><img src="<?php
echo base_url('assets/img/logo-invert.png', get_protocol());
?>
" alt="Image Alternative text" title="Image Title" class="img-responsive" /></b></td>
</tr>
</tbody>
</table>
</div>
</div>
<div style="padding: 0;padding-top: 10px;border-top: 3px solid #0067AB;" class="col-sm-12 col-xs-12">
<div class="col-sm-12 col-xs-12" style="padding:0;">
<div class="booking-item-payment" style="border:none;box-shadow:none;-webkit-box-shadow:none;">
<h5 style="font-weight: 400;border-bottom: 2px solid #0067AB;padding-bottom: 8px;">Flight Details</h5>
<ul class="">
<?php
if (isset($ItineraryInfo->ReservationItems)) {
$ReservationItems = $ItineraryInfo->ReservationItems;
示例4: base_url
<div class="row">
<div class="col-md-12">
<!-- BEGIN PORTLET-->
<div class="portlet box green-meadow">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i><?php
echo $this->lang->line('edit_customer');
?>
</div>
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form action="<?php
echo base_url('Customers/addCustomer', get_protocol());
?>
" class="form-horizontal form-bordered" method="post">
<div class="form-body">
<div class="form-group">
<label class="control-label col-md-3"><?php
echo $this->lang->line('email');
?>
<span class="errormsg">*</span></label>
<div class="col-md-6">
<input type="text" class="form-control" value="<?php
echo set_value('email');
?>
" name="email">
<span class="errormsg"><?php
echo form_error('email');
示例5: base_url
"/>
<link rel="stylesheet" type="text/css" href="<?php
echo base_url('assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css', get_protocol());
?>
"/>
<!-- END PAGE LEVEL STYLES -->
<!-- BEGIN THEME STYLES -->
<link href="<?php
echo base_url('assets/global/css/components.css', get_protocol());
?>
" id="style_components" rel="stylesheet" type="text/css"/>
<link href="<?php
echo base_url('assets/global/css/plugins.css', get_protocol());
?>
" rel="stylesheet" type="text/css"/>
<link href="<?php
echo base_url('assets/admin/layout/css/layout.css', get_protocol());
?>
" rel="stylesheet" type="text/css"/>
<link id="style_color" href="<?php
echo base_url('assets/admin/layout/css/themes/default.css', get_protocol());
?>
" rel="stylesheet" type="text/css"/>
<link href="<?php
echo base_url('assets/admin/layout/css/custom.css', get_protocol());
?>
" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.4.1/css/bootstrap-datepicker.min.css">
示例6: base_url
<div class="row">
<div class="col-md-12">
<!-- BEGIN PORTLET-->
<div class="portlet box green-meadow">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>Ticket Details
</div>
</div>
<div class="portlet-body">
<?php
if (is_array($result) && count($result) > 0) {
?>
<form action="<?php
echo base_url("Bookinghistory/updateBooking/" . $result['t_id'], get_protocol());
?>
" class="form-horizontal form-bordered" method="post">
<table class="table table-striped table-hover table-bordered" id="sample_editable_1">
<tr>
<th>Booking Ref. No.</th>
<th>Total Cost.</th>
<th>Created Date.</th>
</tr>
<?php
$sno = 1;
foreach ($result['ticketResult'] as $ticketResult) {
$t_id = $ticketResult->t_id;
?>
<tr>
<td><?php
示例7: get_current_url
/**
* get the current URL
*/
function get_current_url($with_parameters = false)
{
if ($with_parameters) {
$protocol = get_protocol();
return $protocol . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
} else {
$uri_parts = explode('?', $_SERVER['REQUEST_URI']);
$protocol = get_protocol();
return $protocol . $_SERVER['HTTP_HOST'] . $uri_parts[0];
}
}
示例8: get_server
function get_server()
{
global $options;
$protocol = get_protocol();
if ($options['general']['local_assets'] === true) {
return $protocol . $_SERVER['SERVER_NAME'] . dirname($_SERVER['PHP_SELF']) . "/";
}
return null;
}
示例9: base_url
<div class="row">
<div class="col-md-12">
<!-- BEGIN PORTLET-->
<div class="portlet box green-meadow">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i><?php
echo $this->lang->line('edit_customer');
?>
</div>
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form action="<?php
echo base_url('Customers/updateCustomer/' . $row->user_id, get_protocol());
?>
" class="form-horizontal form-bordered" method="post">
<div class="form-body">
<div class="form-group">
<label class="control-label col-md-3"><?php
echo $this->lang->line('title');
?>
<span class="errormsg">*</span></label>
<div class="col-md-6">
<input type="text" class="form-control" value="<?php
echo $row->title;
?>
" name="title">
<span class="errormsg"><?php
echo form_error('title');
示例10: printDiv
dateFormat: 'mm-dd-yy',
minDate : '-100y',
maxDate : new Date,
yearRange:'-100y:'+ new Date,
changeYear: true,
changeMonth: true
});
function printDiv() {
var printContents = $(".printdiv").html();
document.body.innerHTML = printContents;
window.print();
window.location.href="<?php
echo base_url('Bookinghistory', get_protocol());
?>
";
}
$(document).ready(function(){
$('#sample_editable_1').DataTable( {
"lengthMenu": [[25, 50, 100, -1], [25, 50, 100, "All"]],
"oLanguage": {
"sSearch": "<?php
echo $this->lang->line('search');
?>
",
"oPaginate": {
示例11: base_url
?>
<tr>
<td>
<?php
echo $count;
$count++;
?>
</td>
<td>
<?php
echo $row->airline_code;
?>
</td>
<td>
<img src="<?php
echo base_url("assets/airline_logo/" . $row->airline_image, get_protocol());
?>
" width="100px" />
</td>
<td>
<a onClick="fndelete('<?php
echo $row->a_id;
?>
');" class="btn default btn-xs red">
<i class="fa fa-trash-o"></i> <?php
echo $this->lang->line('delete');
?>
</a>
</td>
示例12: base_url
$("#submit" + i).click();
}
});
}
</script>
<script type="text/javascript">
$('.remove_search').click(function () {
id = $(this).text();
$(this).parent("span").hide();
$.ajax({
url: "<?php
echo base_url('trip/removeHistory', get_protocol());
?>
",
type: "post",
data: {
id: id
},
success: function (data) {
}
});
})
</script>
示例13: htmlspecialchars
if(ua.search(MobileEsp.deviceNintendoDs) > -1) { return "Nintendo DS"};
if(ua.search(MobileEsp.deviceWii) > -1) { return "Nintendo Wii"};
if(ua.search(MobileEsp.deviceNintendo) > -1) { return "Nintendo"};
if(MobileEsp.DetectXbox()) { return "Xbox"};
if(this.isLaptop()) { return "Laptop"};
if(this.isVirtualMachine()) { return "Virtual Machine"};
return 'Unknown';
}
};
rat.regCmp('rat.hardware');
<?php
require_once "bin/util/util.php";
$ticket = htmlspecialchars($_GET["t"], ENT_QUOTES, 'UTF-8');
$protocol = get_protocol();
$port = get_port();
$host = get_host();
$api_path = get_page_path() . "/api";
$interval = 3000;
?>
rat.net = {
config:{
protocol:"<?php
echo $protocol;
?>
",// @String http or https
port:<?php
echo $port;
?>
,// @int like 80 or 8080
示例14: base_url
echo $this->lang->line('why_fly');
?>
</h2>
<ul class="awe-services__list col-md-7">
<li><i class="awe-icon awe-icon-check"></i> <?php
echo $this->lang->line('fast_easy');
?>
</li>
<li><i class="awe-icon awe-icon-check"></i><?php
echo $this->lang->line('book_again');
?>
</li>
<li><i class="awe-icon awe-icon-check"></i> <?php
echo $this->lang->line('customers_trust');
?>
</li>
</ul>
<div class="video-wrapper col-md-5 pull-right">
<img src="<?php
echo base_url('assets/images/b2.jpg', get_protocol());
?>
" style="width:100%">
</div>
</div>
</div>
</div>
</div>
</section>
示例15: base_url
<div class="col-md-12">
<!-- BEGIN PORTLET-->
<div class="portlet box green-meadow">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i><?php
echo $this->lang->line('site_settings');
?>
</div>
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form action="<?php
echo base_url('Adminprofile/updateSiteSettings', get_protocol());
?>
" class="form-horizontal form-bordered" method="post">
<div class="form-body">
<div class="form-group">
<label class="control-label col-md-3"><?php
echo $this->lang->line('office_id');
?>
<sup class="errormsg">*</sup></label>
<div class="col-md-6">
<div class="input-group">
<input type="text" class="form-control" value="<?php
if (count($result) > 0) {
echo $result[0]->office_id;
}
?>