本文整理汇总了PHP中meta函数的典型用法代码示例。如果您正苦于以下问题:PHP meta函数的具体用法?PHP meta怎么用?PHP meta使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了meta函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_meta
public function test_meta()
{
$this->assertEquals("<meta name=\"test\" content=\"foo\" />\n", meta('test', 'foo'));
$this->assertEquals("<meta name=\"foo\" content=\"\" />\n", meta(array('name' => 'foo')));
$this->assertEquals("<meta charset=\"foo\" />\n", meta(array('name' => 'foo', 'type' => 'charset')));
$this->assertEquals("<meta charset=\"foo\" />\n", meta(array('name' => 'foo', 'type' => 'charset')));
}
示例2: Delivery
function Delivery()
{
$this->CheckAdminPrivs('print');
$oid = get('oid', 'number');
$senderID = get('sender', 'int');
$lastADDR = meta('cdp_service_lastADDR');
if ($lastADDR != $senderID)
{
meta('cdp_service_lastADDR', $senderID);
}
$cdpResult = logic('express')->cdp()->CreatePrinterConfig($oid, $senderID);
if ($cdpResult['__error__'])
{
$this->Messager('您还没有设置打印模板,系统正在跳转到模板编辑页面,请稍候...', '?mod=express&code=corp&op=delivery&id='.$cdpResult['corpID'], 3);
}
logic('express')->cdp()->Printed($oid, $senderID);
$cdpCFG = $cdpResult['config'];
$cdpDATA = $cdpResult['cdp'];
$background = logic('upload')->GetOne($cdpDATA['bgid']);
$background['extra'] = unserialize($background['extra']);
if (!$background['extra']['width'] || !$background['extra']['height'])
{
$background['extra'] = handler('image')->Info($background['path']);
logic('upload')->Field($background['id'], 'extra', serialize(array('width'=>$background['extra']['width'],'height'=>$background['extra']['height'])));
}
include handler('template')->file('@admin/print_delivery');
}
示例3: view
function view($id)
{
$data['rs'] = new Dentist($id);
$this->template->title(lang_decode($data['rs']->name) . ' - DrTooth Dental Clinic');
$this->template->append_metadata(meta('description', lang_decode($data['rs']->name) . strip_tags(lang_decode($data['rs']->detail))));
$this->template->build('view', $data);
}
示例4: finder
function finder( $uid, $productid )
{
if (!meta('p_ir_'.$productid))
{
return false;
}
$sql = 'select finder,findtime from ' . TABLE_PREFIX . 'system_members where uid = ' . intval($uid);
$query = $this->DatabaseHandler->Query($sql);
if ( ! $query ) return false;
$finder = $query->GetRow();
$finderid = $finder['finder'];
$findtime = $finder['findtime'];
if ( $finderid == 0 || $findtime == 0 )
{
return false;
}
if ( $findtime + (72 * 3600) < time() )
{
return false;
}
$sql = 'select count(*) from ' . TABLE_PREFIX . 'tttuangou_order where userid = ' . intval($uid) . ' AND paytime > 0';
$query = $this->DatabaseHandler->Query($sql);
$result = $query->GetRow();
if ( $result['count(*)'] > 1 )
{
return false;
}
$ary = array(
'buyid' => $uid, 'buytime' => time(), 'productid' => $productid, 'finderid' => $finderid, 'findtime' => $findtime
);
$this->DatabaseHandler->SetTable(TABLE_PREFIX . 'tttuangou_finder');
$result = $this->DatabaseHandler->Insert($ary);
return true;
}
示例5: index
function index()
{
// check permission
if ($this->account_model->check_admin_permission('account_permissions', 'account_manage_permission') == false) {
redirect('site-admin');
}
// load library
$this->load->library('session');
// load languages
$this->modules_model->load_languages();
if ($this->session->flashdata('update_status') !== null) {
$output['form_status'] = $this->session->flashdata('update_status');
}
$output['list_permissions'] = $this->account_model->list_level_permission();
$output['admin_content'] = $this->load->view('site-admin/account_permission_view', $output, true);
// headr tags output###########################################
$output['page_title'] = $this->config_model->load('site_name') . $this->config_model->load('page_title_separator') . $this->lang->line('account_permissions');
// meta tag
$output['page_metatag'][] = meta('Cache-Control', 'no-cache', 'http-equiv');
$output['page_metatag'][] = meta('Pragma', 'no-cache', 'http-equiv');
// link tag
//$output['page_linktag'][] = link_tag( 'favicon.ico', 'shortcut icon', 'image/ico' );
//$output['page_linktag'][] = link_tag( 'favicon2.ico', 'shortcut icon2', 'image/ico' );
// script tag
//$output['page_scripttag'][] = "<script type=\"text/javascript\" src=\"tinymcs.js\"></script>\n";
//$output['page_scripttag'][] = "<script type=\"text/javascript\" src=\"fckkeditor.js\"></script>\n";
// end headr tags output###########################################
// output
$this->output->set_header('Cache-Control: no-store, no-cache, must-revalidate');
$this->output->set_header('Pragma: no-cache');
$this->load->view('site-admin/index_view', $output);
}
示例6: log
public function log()
{
meta()->set('title', 'Web Deploy Log');
if (is_object($error = $this->check())) {
return $error;
}
$last = (int) input('last') ?: config('git')['log_history'];
return self::content('admin.log', array('last' => $last, 'log' => $this->git()->getLogStat($last)));
}
示例7: category
function category($code = null)
{
if ($code) {
$meta = meta('company_category');
return $meta->load($code);
} else {
return meta('company_category');
}
}
示例8: log
public function log()
{
meta()->set('title', 'GIT Log');
if (is_object($error = $this->check())) {
return $error;
}
$git = $this->git();
$last = (int) input('last') ?: config('git')['log_history'];
return self::content('git.log', array('last' => $last, 'log' => $git->setCommitLinks($git->getLogStat($last))));
}
示例9: index
function index()
{
$this->title = 'Welcome to Becak MVC Framework !';
$this->meta .= meta('keywords', 'becak, php5, framework');
$this->head .= css('welcome.js');
$this->head .= script('welcome');
$data['var'] = 'This page generated by Becak MVC Framework.';
$this->body = view('view_welcome', $data);
app_view('view_base');
}
示例10: uninstall
public function uninstall()
{
$attend = node('philgo_attend');
if ($attend->exists()) {
$attend->uninit();
}
$meta = meta('philgo');
if ($meta->exists()) {
$meta->uninit();
}
}
示例11: __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');
}
}
示例12: __construct
public function __construct()
{
parent::__construct();
loader::sys_helper('view');
loader::sys_helper('head_tag');
$this->base = common::config_item('base_url');
$this->base_url = common::config_item('base_url') . common::config_item('index_page');
$this->base_img = common::config_item('source_url') . 'images/';
$this->meta = meta('Content-type', 'text/html; charset=utf-8', 'equiv');
$this->meta .= meta('author', 'Eko Heri Susanto');
}
示例13: seo
function seo()
{
// bug($this->title);
if ($this->title === null) {
$this->title = lang('sitename');
} else {
$this->title = $this->title . ' - ' . lang('sitename');
}
// bug($this->title);
echo HTML('title', $this->title);
$this->description = lang('About Parkorn Leather Description');
echo meta('description', $this->description);
}
示例14: update
public function update()
{
meta()->set('title', 'RSYNC Update');
if (is_object($response = $this->check())) {
return $response;
}
if (input('find') === 'true') {
$files = (new Repository\Rsync())->getUpdatedFiles();
} else {
$files = array();
}
return self::content('rsync.update', array('config' => config('rsync'), 'files' => $files, 'processor' => (new Processor\Rsync())->update()));
}
示例15: meta_last_page
/**
* To show last meta
*
****/
function meta_last_page()
{
$meta = array(array('name' => 'robots', 'content' => 'index, follow, all'), array('name' => 'revisit-after', 'content' => '1 days'), array('name' => 'language', 'content' => 'Vietnamese'), array('name' => 'dc.creator.email', 'content' => 'phongkhamapollo@gmail.com'), array('name' => 'dc.identifier', 'content' => base_url()), array('name' => 'dc.language', 'content' => 'vi-VN'), array('name' => 'og:type', 'content' => 'article'), array('name' => 'og:title', 'content' => 'Phòng khám đa khoa Apollo'), array('name' => 'geo.position', 'content' => '20.995733, 105.842902'), array('name' => 'geo.placename', 'content' => 'TP.HCM, Hà Nội'), array('name' => 'geo.region', 'content' => 'VN-65'));
$meta_properties = "<meta property='og:type' content='article' />\n";
$meta_properties .= "<meta property='og:title' content='Phòng khám đa khoa Apollo' />\n";
$meta_properties .= "<meta property='og:description' content='Phòng Khám Đa Khoa apollo với các thiết bị y tế hiện đại, phong cách phục vụ chuyên nghiệp hy vọng sẽ góp phần giúp cho tất cả mọi người luôn có một sức khỏe tốt. />\n";
$meta_properties .= "<meta property='og:url' content='" . base_url() . "' />\n";
$meta_properties .= "<meta property='og:sitename' content='Phòng Khám Đa Khoa APOLLO' />";
$meta_itemprop = "<meta itemprop='name' content='Phòng khám đa khoa Apollo' />\n";
$meta_itemprop .= "<meta itemprop='description' content='Phòng Khám Đa Khoa apollo với các thiết bị y tế hiện đại, phong cách phục vụ chuyên nghiệp hy vọng sẽ góp phần giúp cho tất cả mọi người luôn có một sức khỏe tốt.' />\n";
$xhtml_meta = meta($meta) . $meta_properties . $meta_itemprop;
return $xhtml_meta;
}