本文整理汇总了PHP中static_url函数的典型用法代码示例。如果您正苦于以下问题:PHP static_url函数的具体用法?PHP static_url怎么用?PHP static_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了static_url函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gen_show_html
public function gen_show_html()
{
if ($this->value == "") {
return '尚未上传';
}
return '<a href="' . static_url('duploads/' . $this->value) . '" target="_blank">文件下载:' . $this->value . '</a>';
}
示例2: gen_show_html
public function gen_show_html()
{
if ($this->value != "") {
return '<img width="100%" src="' . static_url('uploads/' . $this->value) . '"/>';
} else {
return '尚未上传';
}
}
示例3: rewiteData
public function rewiteData(&$data)
{
if (isset($data['cover'])) {
$data['cover'] = static_url($data['cover']);
} else {
for ($i = 0, $j = count($data); $i < $j; $i++) {
$data[$i]['cover'] = static_url($data[$i]['cover']);
}
}
}
示例4: gen_show_value
public function gen_show_value()
{
$files = "";
foreach ($this->value as $value) {
if ($value == "") {
continue;
}
$files .= static_url($this->uploadDir . '/' . $value) . ';';
}
return $files;
}
示例5: index
public function index()
{
$this->load->model('samsung/movie_model', 'mMovie');
//$this->load->model('api/banner_model','mBanner');
/*$banners = $this->mBanner->getBanners(1,1);
for($i=0,$j=sizeof($banners);$i<$j;$i++){
$banners[$i] = array(
'id'=>$banners[$i]['banner_id'],
'type'=>'web',
'title'=>$banners[$i]['title'],
'description'=>$banners[$i]['description'],
'icon'=>static_url($banners[$i]['cover']),
'nextTo'=>'web',
'url'=>$banners[$i]['link']
);
}
*/
$banners[] = array('id' => '1', 'type' => '', 'title' => '', 'description' => '', 'icon' => static_url('/img/samsung_banner_1080x540.jpg'), 'nextTo' => '', 'url' => '');
$item[] = array('id' => 1, 'type' => 'category', 'title' => 'PREMIUM (PAID)', 'description' => 'พบซีรี่ย์ดังจาก Holywood ที่เยอะที่สุด', 'icon' => static_url('/img/samsung-premium3.png'), 'nextTo' => 'contentGrid', 'url' => base_url('/samsung/movie/premium'));
$item[] = array('id' => 2, 'type' => 'category', 'title' => 'SAMSUNG PRIVILEGE (FREE)', 'description' => 'ดูซีรี่ย์ดัง 2ตอนแรกฟรี', 'icon' => static_url('/img/samsung-free.png'), 'nextTo' => 'contentGrid', 'url' => base_url('/samsung/movie/free'));
if ($this->geoip_lib->InfoIP($this->input->ip_address())) {
if ($this->geoip_lib->result_country_code() != "TH") {
$item = array();
$item[] = array('id' => 0, 'type' => 'category', 'title' => 'Available in thailand only', 'description' => '', 'icon' => '', 'nextTo' => '', 'url' => '');
}
} else {
$item = array();
$item[] = array('id' => 0, 'type' => 'category', 'title' => 'Available in thailand only', 'description' => '', 'icon' => '', 'nextTo' => '', 'url' => '');
}
//$item = array();
//if($this->page==1){
//First page is hot movie
//$movie = $this->mMovie->getMoviesHotFirst($this->page,$this->limit);
//}else{
// $movie = $this->mMovie->getNotHotMovies($this->page,$this->limit);
//}
/*
$countItem = $this->mMovie->getMovieCount();
$movie = $movie['items'];
for($i=0,$j=sizeof($movie);$i<$j;$i++){
$item[] = array(
'id'=>$movie[$i]['movie_id'],
'type'=>'movie',
'title'=>($movie[$i]['is_hot']=='YES'?'[HOT]':'').$movie[$i]['title'],
'description'=>$movie[$i]['summary'],
'icon'=>static_url($movie[$i]['cover']),
'nextTo'=>($movie[$i]['is_series']=='YES')?'ContentGrid':'movieDetail',
'url'=>samsung_api_url('/movie/'.$movie[$i]['movie_id'])
);
}
*/
$data = array('item' => &$item);
$this->response($data);
}
示例6: gen_show_html
public function gen_show_html()
{
$_html = '<ul class="list-group">';
foreach ($this->value as $key => $value) {
$_html .= '<li class="list-group-item">';
$_html .= $this->names[$key] . ':';
if ($value == "") {
$_html .= " - ";
} else {
$_html .= "<img src='" . static_url($value) . "' width='200px'/>";
}
$_html .= '</li>';
}
$_html .= "</ul>";
return $_html;
}
示例7: wrong_url_redirect
function wrong_url_redirect($url)
{
/**
* Wrong URL Redirect
*
* Redirects the request to proper URL
*
* Arguments ( $url )
* -------------------------------------
*
* $url -> Requested URL
*
**/
$qurrey = mysql_query("select * from data where LOWER(LINK)='{$url}'");
$data = mysql_fetch_array($qurrey);
$location = "Location:" . static_url('main', 1) . $data['LINK'];
header('HTTP/1.1 301 Moved Permanently');
header($location);
}
示例8: wrong_category_redirect
function wrong_category_redirect($url)
{
/**
* Wrong URL redirect
*
* Redirects the traffic to Proper URL
*
* Arguments ( $url )
* -------------------------------------
*
* $article_url -> URL to be inspected
*
**/
$url = strtolower($url);
$qurrey = mysql_query("select * from categories where LOWER(URL)='{$url}'");
$row = mysql_fetch_array($qurrey);
$location = "Location:" . static_url('main', 1) . $row['URL'];
header('HTTP/1.1 301 Moved Permanently');
header($location);
}
示例9: main_search_box
function main_search_box($q)
{
/**
* Main search
*
* Prints the FUll width search box
*
**/
if ($GLOBALS['search'] == false) {
?>
<div id="search-container">
<div class="inner-container">
<div class="row">
<div class="column-small-11 center">
<div class="top-search">
<form action="<?php
echo static_url('main') . "/search.php";
?>
" class="search">
<div class="row">
<div class="column-xsmall-10 padd0"><input type="search" class="search-box" name="q" placeholder="<?php
if ($q != false) {
echo $q;
} else {
echo "Type to seach";
}
?>
" ></div>
<div class="column-xsmall-2 padd0-xsmall"><input type="submit" value="search" class="search-button"></div>
</div>
</form>
</div>
</div>
</div>
</div>
</div><!-- end of id="search-container" -->
<?php
$GLOBALS['search'] = true;
}
}
示例10: static_url
?>
<img alt="<?php
echo $movie['title_en'];
?>
" src="<?php
echo static_url($movie['cover']);
?>
">
<?php
} else {
?>
<img alt="<?php
echo $movie['title_en'];
?>
" class="lazy" src="img/blank.gif" data-src="<?php
echo static_url($movie['cover']);
?>
">
<?php
}
?>
<h3><?php
echo $movie['title'];
?>
</h3>
<?php
if ($movie['is_soon'] == 'YES') {
?>
<span class="type soon">coming soon</span>
<?php
示例11: static_url
"></script>
<script src="<?php
echo static_url('/js/jquery.mousewheel-3.0.6.pack.js');
?>
"></script>
<!--<script src="<?php
echo static_url('/js/jquery.fancybox.js?v=2.1.5');
?>
"></script>-->
<script src="<?php
echo static_url('/js/perfect-scrollbar.js');
?>
"></script>
<script src="<?php
echo static_url('/js/jquery.lazy.1.9.min.js');
?>
"></script>
<script>
/* Header scroll */
$(document).ready(function(){
var headerSmallHeight = 140;
$(window).scroll(function(){
st = $(this).scrollTop();
if(st>headerSmallHeight){
$('#header').addClass('small');
}else{
$('#header').removeClass('small');
}
});
示例12: static_url
<link rel="stylesheet" href="<?php
echo static_url('theme/admin/css/password.css');
?>
" />
<?php
echo ace_header('用户', $item->agentid);
echo ace_form_open('', '', array('id' => $item->agentid));
$options = array('label_text' => '代理账号', 'datatype' => '*', 'nullmsg' => "请输入代理账号!", 'errormsg' => "请输入代理账号", 'help' => '代理登录后台的账号');
echo ace_input_m($options, 'agentid', $item->agentid, 'maxlength="45" disabled="disabled"');
$options = array('label_text' => '代理全称', 'datatype' => '*', 'help' => '代理全称');
echo ace_input_m($options, 'agentname', $item->agentname, 'maxlength="45" disabled="disabled"');
$options = array('label_text' => '代理简称', 'datatype' => '*', 'help' => '代理简称');
echo ace_input_m($options, 'shortname', $item->shortname, 'maxlength="45" disabled="disabled"');
$options = array('label_text' => '手机号', 'datatype' => '*11-11', 'nullmsg' => "请输入手机号!", 'errormsg' => "请输入手机号", 'help' => '代理联系人手机号');
echo ace_input_m($options, 'mobilenum', $item->mobilenum, 'maxlength="11" disabled="disabled"');
$options = array('label_text' => '联系人', 'datatype' => '*1-15', 'nullmsg' => "请输入联系人!", 'errormsg' => "请输入联系人", 'help' => '联系人');
echo ace_input_m($options, 'contact', $item->contact, 'maxlength="15" disabled="disabled"');
$options = array('label_text' => 'QQ', 'help' => '代理联系人的QQ');
// echo ace_input_m($options,'qq',$item->qq,'maxlength="45" disabled="disabled"');
?>
<div class="clearfix form-actions">
<div class="col-md-offset-3 col-md-9">
<a href="<?php
echo base_url('agent/agent');
?>
" class="btn btn-info">
<i class="icon-list"></i>返回列表
</a>
</div>
</div>
示例13: static_url
<h6>For those who make websites.</h6>
<a href="<?php
static_url('main');
?>
Web-Design" class="details-link">all work</a>
</div>
</div>
</li>
<li>
<div class="row">
<div class="column-xxsmall-3 sections-list-icon"><i class="fa fa-html5"></i></div>
<div class="column-xxsmall-9 sections-list-description">
<h3 class="post-list-title">Web Development</h3>
<h6>For those who code the web.</h6>
<a href="<?php
static_url('main');
?>
Web-Development" class="details-link">all work</a>
</div>
</div>
</li>
</ul>
</div>
<div class="column-small-8 padd0">
<h3 class="section-heading"><i class="fa fa-eye"></i> Most Read</h3>
<div class="row">
<div class="column-xsmall-7 most-read-post">
<ul class="sections-list">
<li><?php
post_list(122, 2);
?>
示例14: static_url
<div class="panel panel-default">
<div class="panel-heading">
文件名:<span id="file_name_<?php
echo $key;
?>
"><?php
echo $value;
?>
</span>
</div>
<div class="panel-body">
<?php
if ($value != "") {
?>
<a href="<?php
echo static_url('duploads/' . $value);
?>
" target="_blank">文件下载:<?php
echo $value;
?>
</a>
<div>
*注意!!新文件上传将替换旧有文件!
</div>
<?php
}
?>
</div>
<div class="panel-footer">
<a href="javascript:void(0);" class="btn btn-danger ajax_input_holder">
<span class="glyphicon glyphicon-paperclip"></span> 上传
示例15: export_peijian_use
public function export_peijian_use($store = 'all', $from = '', $to = '')
{
$this->store = $store;
$this->from = $from;
$this->to = $to;
$this->load_org_info();
$this->load->model('lists/Org_list', "allOrgList");
$this->allOrgList->load_data();
$storeName = '全部';
if ($store != 'all' && isset($this->allOrgList->record_list[$store])) {
$storeName = $this->allOrgList->record_list[$store]->field_list['name']->value;
}
$this->load->model('lists/Peijianflow_list', "listInfo");
$this->listInfo->is_only_brief_fields = true;
if ($this->store != '' || $from != '' || $to != '') {
if ($this->store != 'all') {
$this->listInfo->add_where(WHERE_TYPE_WHERE, 'orgId', $this->store);
}
if ($from != '') {
$beginTS = $this->utility->getTSFromDateString($from);
$this->listInfo->add_where(WHERE_TYPE_WHERE_GTE, 'beginTS', $beginTS);
}
if ($to != '') {
$endTS = $this->utility->getTSFromDateString($to) + 86400 - 1;
$this->listInfo->add_where(WHERE_TYPE_WHERE_LT, 'beginTS', $endTS);
}
}
/*
$this->field_list['typ']->setEnum(array(0=>'其他',
1=>"入库",
2=>"出库",
3=>"快速入库",
5=>"出库回库",
6=>"退货",
));
*/
$this->listInfo->add_where(WHERE_TYPE_IN, 'typ', array(0, 2, 5));
$this->listInfo->load_data_with_where();
$this->templateFile = "template_peijianxiaohao.xlsx";
$this->exportFilePrefix = "配件流水-消耗-" . $storeName . '-';
$fileName = BASEPATH . "../wwwroot/templates/" . $this->templateFile;
$exportName = "exports/" . $this->exportFilePrefix . date('Y') . "-" . date('m') . "-" . date('d') . '-' . substr(md5(time()), 2, 6) . '.xlsx';
$exportFileName = BASEPATH . "../wwwroot/misc/" . $exportName;
$this->load->library("excel");
$this->excel->init($fileName);
$objWorksheet = $this->excel->excel->getActiveSheet();
// 汽车品牌 类别 配件名称 品牌 标识 型号 保修 卖价 是否常用件 进价
$title = $this->exportFilePrefix . date('Y') . "-" . date('m') . "-" . date('d') . ' 时间区间:' . $from . '-' . $to;
$objWorksheet->getCell('A1')->setValue($title);
$i = 3;
foreach ($this->listInfo->record_list as $this_record) {
//'bookShowId','peijianId','peijiantyp','peijianming','orgId','beginTS','typ','counter','chengben','uid'
//门店 配件数据库ID 配件类型 配件名 数量 时间 操作人 行为 成本 订单号
$objWorksheet->getCell('A' . $i)->setValue($this_record->field_list['orgId']->gen_show_value());
$objWorksheet->getCell('B' . $i)->setValue($this_record->field_list['peijianId']->gen_show_value());
$objWorksheet->getCell('C' . $i)->setValue($this_record->field_list['peijiantyp']->gen_show_value());
$objWorksheet->getCell('D' . $i)->setValue($this_record->field_list['peijianming']->gen_show_value());
$objWorksheet->getCell('E' . $i)->setValue($this_record->field_list['counter']->gen_show_value());
$objWorksheet->getCell('F' . $i)->setValue($this_record->field_list['beginTS']->gen_show_html());
$objWorksheet->getCell('G' . $i)->setValue($this_record->field_list['uid']->gen_show_value());
$objWorksheet->getCell('H' . $i)->setValue($this_record->field_list['typ']->gen_show_value());
$objWorksheet->getCell('I' . $i)->setValue($this_record->field_list['chengben']->gen_show_value());
$objWorksheet->getCell('J' . $i)->setValue($this_record->field_list['bookShowId']->gen_show_value());
$i++;
}
$objWriter = $this->excel->initWriter();
$objWriter->save($exportFileName);
header('Location: ' . static_url($exportName));
}