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


PHP link_tag函数代码示例

本文整理汇总了PHP中link_tag函数的典型用法代码示例。如果您正苦于以下问题:PHP link_tag函数的具体用法?PHP link_tag怎么用?PHP link_tag使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: compile

 /**
  * Compile
  *
  * Usage:
  * {{ compass:compile file="" output="" }}
  *
  * @param	array
  * @return	array
  */
 function compile()
 {
     $this->load->library('compass');
     $this->load->library('asset');
     $file = $this->attribute('file', 'style.scss');
     $attributes = $this->attributes();
     $module = $this->attribute('module', '_theme_');
     $output = $this->attribute('output', 'style.css');
     $base = $this->attribute('base', 'css');
     foreach (array('file', 'module', 'base', 'output') as $key) {
         if (isset($attributes[$key])) {
             unset($attributes[$key]);
         } else {
             if ($key === 'file') {
                 return '';
             }
         }
     }
     try {
         $viewsPath = rtrim($this->load->get_var('template_views'), '/');
         $themePath = preg_replace('#(\\/views(\\/web|\\/mobile)?)$#', '', $viewsPath) . '/';
         $compass = new Compass();
         $compass->init(Asset::get_filepath_css($file, false), Asset::get_filepath_css($output, false));
         return link_tag(Asset::get_filepath_css($output, true), 'stylesheet');
     } catch (exception $ex) {
         exit('Compass fatal error:<br />' . $file . ',' . $module . ',' . $base . '<br />' . $ex->getMessage());
     }
 }
开发者ID:rostber,项目名称:pyrocms_compass,代码行数:37,代码来源:compass.php

示例2: contacto

 function contacto()
 {
     $data['con'] = TRUE;
     $data['title'] = 'Bolivar International - Contacto';
     $data['extra_css'] = link_tag('css/_institucional.css') . "\n";
     $val = $this->form_validation;
     $val->set_rules('nom', 'nombre', 'trim|required|xss_clean');
     $val->set_rules('empresa', 'empresa', 'trim|xss_clean');
     $val->set_rules('email', 'e-mail', 'trim|required|valid_email|xss_clean');
     $val->set_rules('tel', 'teléfono', 'trim|xss_clean');
     $val->set_rules('coment', 'comentario', 'trim|required|xss_clean');
     if ($val->run()) {
         $this->email->from($this->input->post('email'), $this->input->post('nombre'));
         $this->email->to('ventas@bolivarinternational.com');
         $mensaje = '
     Mensaje enviado desde el formulario contactenos en la web www.bolivarinternational.com con los siguientes datos:
     
     Nombre(s): ' . $val->set_value('nom') . '
     Empresa: ' . $val->set_value('empresa') . '
     Email: ' . $val->set_value('email') . '
     Teléfono: ' . $val->set_value('tel') . '
     Comentario: ' . $val->set_value('coment') . '
   ';
         $this->email->subject('Formulario contactenos - bolivarinternational.com');
         $this->email->message($mensaje);
         if ($this->email->send()) {
             // $this->load->view('contacto/contacto_success');
             $data['contenido'] = $this->load->view('contacto/enviado', null, TRUE);
         }
         // echo $this->email->print_debugger();
     } else {
         $data['contenido'] = $this->load->view('contacto/contacto', null, TRUE);
     }
     $this->load->view('template_base', $data);
 }
开发者ID:josu3e,项目名称:bolvar,代码行数:35,代码来源:contacto.php

示例3: css

 /**
  * Theme CSS
  *
  * Insert a CSS tag with location based for url or path from the theme or module
  *
  * Usage:
  *  {{ theme:css file="" }}
  *
  * @return string The link HTML tag for the stylesheets.
  */
 public function css()
 {
     $file = $this->attribute('file');
     $title = $this->attribute('title');
     $media = $this->attribute('media');
     return link_tag($this->css_url($file), 'stylesheet', 'text/css', $title, $media);
 }
开发者ID:ramonleenders,项目名称:pyrocms,代码行数:17,代码来源:theme.php

示例4: gc_css

 /**
  * Load CSS
  *
  * @param $css_files
  * @return array
  */
 function gc_css($css_files)
 {
     $resp = [];
     foreach ($css_files as $file) {
         array_push($resp, link_tag($file));
     }
     return $resp;
 }
开发者ID:normeno,项目名称:ci_utilities,代码行数:14,代码来源:grocery_helper.php

示例5: nosotros

 function nosotros()
 {
     $data['nos'] = TRUE;
     $data['title'] = 'Bolivar International - Nosotros';
     $data['extra_css'] = link_tag('css/institucional.css') . "\n";
     $data['contenido'] = $this->load->view('nosotros/nosotros', null, TRUE);
     $this->load->view('template_base', $data);
 }
开发者ID:josu3e,项目名称:bolvar,代码行数:8,代码来源:nosotros.php

示例6: css

 function css()
 {
     $result = directory_map("./assets/css/");
     // pre($result);
     if (is_array($result)) {
         foreach ($result as $val) {
             echo link_tag("assets/css/" . $val);
         }
     }
 }
开发者ID:rmancheker,项目名称:codeIg,代码行数:10,代码来源:my_helper.php

示例7: links_page

/**
 * To link a page
 * 
 ****/
function links_page()
{
    $urlCss = 'public/assets/css/';
    $links = array(array('href' => $urlCss . 'reset.css', 'type' => 'text/css', 'rel' => 'stylesheet'), array('href' => $urlCss . 'bootstrap.css', 'type' => 'text/css', 'rel' => 'stylesheet'), array('href' => $urlCss . 'bootstrap-theme.css', 'type' => 'text/css', 'rel' => 'stylesheet'), array('href' => $urlCss . 'font-awesome.css', 'type' => 'text/css', 'rel' => 'stylesheet'), array('href' => $urlCss . 'style.css', 'type' => 'text/css', 'rel' => 'stylesheet'), array('href' => $urlCss . 'menu.css', 'type' => 'text/css', 'rel' => 'stylesheet'), array('href' => $urlCss . 'modern-business.css', 'type' => 'text/css', 'rel' => 'stylesheet'), array('href' => $urlCss . 'jquery.loader.css', 'type' => 'text/css', 'rel' => 'stylesheet'), array('href' => $urlCss . 'phone.menu.css', 'type' => 'text/css', 'rel' => 'stylesheet'), array('href' => base_url() . 'public/assets/images/ico/pk-logo.ico', 'type' => 'image/x-icon', 'rel' => 'shortcut icon'));
    $str = '';
    foreach ($links as $link) {
        $str .= link_tag($link);
    }
    return $str;
}
开发者ID:pkapollo,项目名称:phongkhamapollo.com,代码行数:14,代码来源:page_helper.php

示例8: __construct

 public function __construct()
 {
     $this->CI =& get_instance();
     //$this->CI调用框架方法
     $this->CI->load->helper(array('html', 'string', 'url'));
     $this->CI->load->model('tool/spider_model');
     if (!is_cli()) {
         echo doctype('html4-trans') . meta('Content-type', 'text/html;charset=utf-8', 'equiv');
         echo link_tag(base_url('public/image/favicon.ico'), 'shortcut icon', 'image/ico');
     }
 }
开发者ID:ahmatjan,项目名称:lv,代码行数:11,代码来源:Spider_func.php

示例9: head

 public function head($title = '')
 {
     $head = "<!DOCTYPE html>\n";
     $head .= "<html>\n";
     $head .= "<head>\n";
     $head .= "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n";
     $head .= "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n";
     $head .= "<meta charset=\"utf-8\"/>\n";
     $head .= " <!-- load library CSS -->\n";
     $head .= link_tag('public/assets/css/reset.css');
     $head .= link_tag('public/assets/css/bootstrap.css');
     $head .= link_tag('public/assets/css/bootstrap-theme.css');
     $head .= link_tag('public/assets/css/style.css');
     $head .= link_tag('public/assets/css/menu.css');
     $head .= link_tag('public/assets/css/modern-business.css');
     $head .= link_tag('public/assets/css/jquery.loader.css');
     $head .= link_tag('public/assets/css/phone.menu.css');
     $head .= link_tag('public/assets/css/bootbox.css');
     $head .= link_tag('public/assets/css/jquery-ui.css');
     $head .= link_tag('public/assets/css/bootstrapValidator.css');
     $head .= "<!-- end lib css -->\n";
     if ($title) {
         $head .= "<title>" . $title . "</title>";
     } else {
         $head .= "<title>Phòng khám đa khoa Apollo</title>";
     }
     $head .= "<!-- icon link -->\n";
     $head .= link_tag('public/assets/images/ico/pk-logo.ico', 'shortcut icon', 'image/ico');
     $head .= "<link rel='shortcut icon' href='http://phongkhamapollo.com/public/assets/images/ico/pk-logo.ico' type='image/x-icon' />";
     $head .= "<!-- start lib javascript -->\n";
     $head .= script_tag('public/assets/js/jquery-1.11.3.js');
     $head .= script_tag('public/assets/js/jquery.loader.js');
     $head .= script_tag('public/assets/js/bootstrap.js');
     $head .= script_tag('public/assets/js/menu.js');
     $head .= script_tag('public/assets/js/jquery-ui.js');
     $head .= script_tag('public/assets/js/bootstrapValidator.js');
     $head .= script_tag('public/assets/js/jquery.popupoverlay.js');
     $head .= script_tag('public/assets/js/jquery.mmenu.js');
     $head .= script_tag('public/assets/js/bootbox.js');
     $head .= script_tag('public/assets/js/bootboxExample.js');
     $head .= script_tag('public/assets/js/jquery.sticky-kit.js');
     $head .= "<!-- end lib javascript -->\n";
     $head .= "<!-- no robots -->\n";
     $head .= "<meta name=\"robots\" content=\"noindex,nofollow\"/>\n";
     $head .= "</head>\n";
     return $head;
 }
开发者ID:pkapollo,项目名称:phongkhamapollo.com,代码行数:47,代码来源:Catalogmodel.php

示例10: paginate

 public function paginate($page = 'page')
 {
     global $controller;
     $page_count = ceil($this->paginate_row_count / $this->per_page);
     if ($page_count < 2) {
         return '';
     }
     $pages = [];
     for ($i = 0; $i < $page_count; $i++) {
         if ($i == $this->paginate_current_page) {
             $pages[] = $i + 1;
         } else {
             $pages[] = link_tag($i + 1, $controller->current_url([$page => $i]));
         }
     }
     return implode(' | ', $pages);
 }
开发者ID:szchkt,项目名称:leaklog-web,代码行数:17,代码来源:paginate_trait.php

示例11: getCSS

		public function getCSS($files = array())
		{
			$this->CI->load->helper('html');

			$html = '';

			foreach($this->cssFiles as $file)
			{
				$html.= link_tag(array(
					'href' => 'resources/css/'.$file,
					'rel' => 'stylesheet',
					'type' => 'text/css'
				));
			}

			return $html;
		}
开发者ID:JohannesFischer,项目名称:adora-gallery,代码行数:17,代码来源:Content.php

示例12: css

function css($filename, $path = 'css', $title = '', $media = '')
{
    if (!is_array($filename)) {
        $filename = array($filename);
    }
    /*$_cont = base::getInstance();
      
      if(isset($_cont->_ent->css_folder{1}))
      {
          $path = $path . $_cont->_ent->css_folder; 
      }*/
    $url = base::getInstance()->config->slash_item('source_url') . 'css';
    $style = '';
    foreach ($filename as $key => $css) {
        $style .= "\n" . link_tag($url . '/' . $css, 'stylesheet', 'text/css', $title, $media);
    }
    return $style;
}
开发者ID:anugrahbsoe,项目名称:Becak-HMVC-Framework,代码行数:18,代码来源:head_tag_helper.php

示例13: edit

	/**
	 * Action edit
	 * Loads the /lens/edit view
	 */
	function edit()
	{
		if ( ! $this->dx_auth->is_logged_in())
		{
			redirect('/main/login', 'refresh');
			return;
		}
		
		$this->load->helper('html');
		
		$data = array();
		$data['extraHeadContent'] = link_tag('css/default.css')
									. '<script type="text/javascript" src="'.base_url().'js/jquery-1.3.2.js"></script>'; 
		$data['title'] = $this->lang->line('system_name');
		$data['main'] = 'lens/edit';
		
		$this->load->vars($data);
		$this->load->view('template');
	}
开发者ID:hesseltined,项目名称:VisionPOS,代码行数:23,代码来源:lens.php

示例14: load_css

 function load_css($data)
 {
     $CI =& get_instance();
     $CI->load->helper('html');
     $CI->config->load('assets');
     if (!$CI->config->item('css_path')) {
         $CI->config->set_item('css_path', 'public/css/');
     }
     $csspath = base_url() . $CI->config->item('css_path');
     if (!is_array($data)) {
         return link_tag($csspath . $data, 'stylesheet', 'text/css');
     } else {
         $return = '';
         foreach ($data as $item) {
             if (!is_array($item)) {
                 $return .= link_tag($csspath . $item, 'stylesheet', 'text/css');
             } else {
                 $return .= link_tag($csspath . $item[0], 'stylesheet', 'text/css', '', $item[1]);
             }
         }
     }
     return $return;
 }
开发者ID:ruanmyv,项目名称:Project-Task-Php,代码行数:23,代码来源:assets_helper.php

示例15: load_jquery

function load_jquery($front = false)
{
    //jquery & jquery ui files & path
    $path = 'js/jquery';
    $jquery = 'jquery-1.5.1.min.js';
    $jquery_ui = 'jquery-ui-1.8.11.custom.min.js';
    $jquery_ui_css = 'jquery-ui-1.8.11.custom.css';
    //load jquery ui css
    if ($front) {
        echo link_tag($path . '/' . $front . '/' . $jquery_ui_css);
    } else {
        echo link_tag($path . 'gocart/' . $jquery_ui_css);
    }
    //load scripts
    echo load_script($path . '/' . $jquery);
    echo load_script($path . '/' . $jquery_ui);
    //colorbox
    $path = $path . '/colorbox';
    $colorbox = 'jquery.colorbox-min.js';
    $colorbox_css = 'colorbox.css';
    echo link_tag($path . '/' . $colorbox_css);
    echo load_script($path . '/' . $colorbox);
}
开发者ID:Joncg,项目名称:eelly_cps_fx,代码行数:23,代码来源:MY_html_helper.php


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