本文整理汇总了PHP中ob_start函数的典型用法代码示例。如果您正苦于以下问题:PHP ob_start函数的具体用法?PHP ob_start怎么用?PHP ob_start使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ob_start函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: command_dd
function command_dd()
{
$args = func_get_args();
$options = $this->get_options();
$dd = kernel::single('dev_docbuilder_dd');
if (empty($args)) {
$dd->export();
} else {
foreach ($args as $app_id) {
$dd->export_tables($app_id);
}
}
if ($filename = $options['result-file']) {
ob_start();
$dd->output();
$out = ob_get_contents();
ob_end_clean();
if (!is_dir(dirname($filename))) {
throw new Exception('cannot find the ' . dirname($filename) . 'directory');
} elseif (is_dir($filename)) {
throw new Exception('the result-file path is a directory.');
}
file_put_contents($options['result-file'], $out);
echo 'data dictionary doc export success.';
} else {
$dd->output();
}
}
开发者ID:sss201413,项目名称:ecstore,代码行数:28,代码来源:doc.php
示例2: dump
function dump($var, $echo = true, $label = null, $strict = true)
{
$label = $label === null ? '' : rtrim($label) . ' ';
if (!$strict) {
if (ini_get('html_errors')) {
$output = print_r($var, true);
$output = "<pre>" . $label . htmlspecialchars($output, ENT_QUOTES) . "</pre>";
} else {
$output = $label . " : " . print_r($var, true);
}
} else {
ob_start();
var_dump($var);
$output = ob_get_clean();
if (!extension_loaded('xdebug')) {
$output = preg_replace("/\\]\\=\\>\n(\\s+)/m", "] => ", $output);
$output = '<pre>' . $label . htmlspecialchars($output, ENT_QUOTES, "GB2312") . '</pre>';
}
}
if ($echo) {
echo $output;
return null;
} else {
return $output;
}
}
开发者ID:winiceo,项目名称:job,代码行数:26,代码来源:lib.php
示例3: testAuth
/**
* Test for AuthenticationSignon::auth
*
* @return void
*/
public function testAuth()
{
if (!defined('PMA_TEST_HEADERS')) {
$this->markTestSkipped('Cannot redefine constant/function - missing runkit extension');
}
// case 1
$GLOBALS['cfg']['Server']['SignonURL'] = '';
ob_start();
$this->object->auth();
$result = ob_get_clean();
$this->assertContains('You must set SignonURL!', $result);
// case 2
$GLOBALS['cfg']['Server']['SignonURL'] = 'http://phpmyadmin.net/SignonURL';
$_REQUEST['old_usr'] = 'oldUser';
$GLOBALS['cfg']['Server']['LogoutURL'] = 'http://phpmyadmin.net/logoutURL';
$this->object->auth();
$this->assertContains('Location: http://phpmyadmin.net/logoutURL?PHPSESSID=', $GLOBALS['header'][0]);
// case 3
$GLOBALS['header'] = array();
$GLOBALS['cfg']['Server']['SignonURL'] = 'http://phpmyadmin.net/SignonURL';
$_REQUEST['old_usr'] = '';
$GLOBALS['cfg']['Server']['LogoutURL'] = '';
$this->object->auth();
$this->assertContains('Location: http://phpmyadmin.net/SignonURL?PHPSESSID=', $GLOBALS['header'][0]);
}
开发者ID:roccivic,项目名称:phpmyadmin,代码行数:30,代码来源:PMA_AuthenticationSignon_test.php
示例4: smarty_core_display_debug_console
/**
* Smarty debug_console function plugin
*
* Type: core<br>
* Name: display_debug_console<br>
* Purpose: display the javascript debug console window
* @param array Format: null
* @param Smarty
*/
function smarty_core_display_debug_console($params, &$smarty)
{
// we must force compile the debug template in case the environment
// changed between separate applications.
if (empty($smarty->debug_tpl)) {
// set path to debug template from SMARTY_DIR
$smarty->debug_tpl = SMARTY_DIR . 'debug.tpl';
if ($smarty->security && is_file($smarty->debug_tpl)) {
$smarty->secure_dir[] = realpath($smarty->debug_tpl);
}
$smarty->debug_tpl = 'file:' . SMARTY_DIR . 'debug.tpl';
}
$_ldelim_orig = $smarty->left_delimiter;
$_rdelim_orig = $smarty->right_delimiter;
$smarty->left_delimiter = '{';
$smarty->right_delimiter = '}';
$_compile_id_orig = $smarty->_compile_id;
$smarty->_compile_id = null;
$_compile_path = $smarty->_get_compile_path($smarty->debug_tpl);
if ($smarty->_compile_resource($smarty->debug_tpl, $_compile_path)) {
ob_start();
$smarty->_include($_compile_path);
$_results = ob_get_contents();
ob_end_clean();
} else {
$_results = '';
}
$smarty->_compile_id = $_compile_id_orig;
$smarty->left_delimiter = $_ldelim_orig;
$smarty->right_delimiter = $_rdelim_orig;
return $_results;
}
开发者ID:SjayLiFe,项目名称:CTRev,代码行数:41,代码来源:core.display_debug_console.php
示例5: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_7088dc18de042b162a99a327c85232e1f7c79938f5c6e62a2f20a47464d52c5f = $this->env->getExtension("native_profiler");
$__internal_7088dc18de042b162a99a327c85232e1f7c79938f5c6e62a2f20a47464d52c5f->enter($__internal_7088dc18de042b162a99a327c85232e1f7c79938f5c6e62a2f20a47464d52c5f_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "WebProfilerBundle:Profiler:toolbar_item.html.twig"));
// line 1
if (isset($context["link"]) ? $context["link"] : $this->getContext($context, "link")) {
// line 2
echo " ";
ob_start();
// line 3
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("token" => isset($context["token"]) ? $context["token"] : $this->getContext($context, "token"), "panel" => isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"))), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "html", null, true);
echo "</a>\n ";
$context["icon"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
}
// line 6
echo "<div class=\"sf-toolbar-block\">\n <div class=\"sf-toolbar-icon\">";
// line 7
echo twig_escape_filter($this->env, array_key_exists("icon", $context) ? _twig_default_filter(isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "") : "", "html", null, true);
echo "</div>\n <div class=\"sf-toolbar-info\">";
// line 8
echo twig_escape_filter($this->env, array_key_exists("text", $context) ? _twig_default_filter(isset($context["text"]) ? $context["text"] : $this->getContext($context, "text"), "") : "", "html", null, true);
echo "</div>\n</div>\n";
$__internal_7088dc18de042b162a99a327c85232e1f7c79938f5c6e62a2f20a47464d52c5f->leave($__internal_7088dc18de042b162a99a327c85232e1f7c79938f5c6e62a2f20a47464d52c5f_prof);
}
开发者ID:valeriemontoya90,项目名称:findWorker,代码行数:27,代码来源:8d4635b47ab8ab3bf3352cb81a02e822f23088a5da0711f03c5ad81c103fe122.php
示例6: __construct
/**
* Constructor
*
* @access public
* @param object ipsRegistry reference
* @param array Configuration info for this method
* @param array Custom configuration info for this method
* @return void
*/
public function __construct(ipsRegistry $registry, $method, $conf = array())
{
$this->method_config = $method;
$this->openid_config = $conf;
parent::__construct($registry);
//-----------------------------------------
// Fix include path for OpenID libs
//-----------------------------------------
$path_extra = dirname(__FILE__);
$path = ini_get('include_path');
$path = $path_extra . PATH_SEPARATOR . $path;
ini_set('include_path', $path);
define('Auth_OpenID_RAND_SOURCE', null);
//-----------------------------------------
// OpenID libraries are not STRICT compliant
//-----------------------------------------
ob_start();
/**
* Turn off strict error reporting for openid
*/
if (version_compare(PHP_VERSION, '5.2.0', '>=')) {
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_RECOVERABLE_ERROR | E_COMPILE_ERROR | E_USER_ERROR | E_USER_WARNING);
} else {
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_COMPILE_ERROR | E_USER_ERROR | E_USER_WARNING);
}
//-----------------------------------------
// And grab libs
//-----------------------------------------
require_once "Auth/OpenID/Consumer.php";
require_once "Auth/OpenID/FileStore.php";
require_once "Auth/OpenID/SReg.php";
require_once "Auth/OpenID/PAPE.php";
}
开发者ID:dalandis,项目名称:Visualization-of-Cell-Phone-Locations,代码行数:42,代码来源:auth.php
示例7: pc_tag
/**
* PC标签中调用数据
* @param array $data 配置数据
*/
public function pc_tag($data)
{
$siteid = isset($data['siteid']) && intval($data['siteid']) ? intval($data['siteid']) : get_siteid();
$r = $this->db->select(array('pos' => $data['pos'], 'siteid' => $siteid));
$str = '';
if (!empty($r) && is_array($r)) {
foreach ($r as $v) {
if (defined('IN_ADMIN') && !defined('HTML')) {
$str .= '<div id="block_id_' . $v['id'] . '" class="admin_block" blockid="' . $v['id'] . '">';
}
if ($v['type'] == '2') {
extract($v, EXTR_OVERWRITE);
$data = string2array($data);
if (!defined('HTML')) {
ob_start();
include $this->template_url($id);
$str .= ob_get_contents();
ob_clean();
} else {
include $this->template_url($id);
}
} else {
$str .= $v['data'];
}
if (defined('IN_ADMIN') && !defined('HTML')) {
$str .= '</div>';
}
}
}
return $str;
}
开发者ID:klj123wan,项目名称:czsz,代码行数:35,代码来源:block_tag.class.php
示例8: setup_wizard
/**
* Show the setup wizard
*/
public function setup_wizard()
{
if (empty($_GET['page']) || 'wc-setup' !== $_GET['page']) {
return;
}
$this->steps = array('introduction' => array('name' => __('Introduction', 'woocommerce'), 'view' => array($this, 'wc_setup_introduction'), 'handler' => ''), 'pages' => array('name' => __('Page Setup', 'woocommerce'), 'view' => array($this, 'wc_setup_pages'), 'handler' => array($this, 'wc_setup_pages_save')), 'locale' => array('name' => __('Store Locale', 'woocommerce'), 'view' => array($this, 'wc_setup_locale'), 'handler' => array($this, 'wc_setup_locale_save')), 'shipping_taxes' => array('name' => __('Shipping & Tax', 'woocommerce'), 'view' => array($this, 'wc_setup_shipping_taxes'), 'handler' => array($this, 'wc_setup_shipping_taxes_save')), 'payments' => array('name' => __('Payments', 'woocommerce'), 'view' => array($this, 'wc_setup_payments'), 'handler' => array($this, 'wc_setup_payments_save')), 'next_steps' => array('name' => __('Ready!', 'woocommerce'), 'view' => array($this, 'wc_setup_ready'), 'handler' => ''));
$this->step = isset($_GET['step']) ? sanitize_key($_GET['step']) : current(array_keys($this->steps));
$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
wp_register_script('select2', WC()->plugin_url() . '/assets/js/select2/select2' . $suffix . '.js', array('jquery'), '3.5.2');
wp_register_script('wc-enhanced-select', WC()->plugin_url() . '/assets/js/admin/wc-enhanced-select' . $suffix . '.js', array('jquery', 'select2'), WC_VERSION);
wp_localize_script('wc-enhanced-select', 'wc_enhanced_select_params', array('i18n_matches_1' => _x('One result is available, press enter to select it.', 'enhanced select', 'woocommerce'), 'i18n_matches_n' => _x('%qty% results are available, use up and down arrow keys to navigate.', 'enhanced select', 'woocommerce'), 'i18n_no_matches' => _x('No matches found', 'enhanced select', 'woocommerce'), 'i18n_ajax_error' => _x('Loading failed', 'enhanced select', 'woocommerce'), 'i18n_input_too_short_1' => _x('Please enter 1 or more characters', 'enhanced select', 'woocommerce'), 'i18n_input_too_short_n' => _x('Please enter %qty% or more characters', 'enhanced select', 'woocommerce'), 'i18n_input_too_long_1' => _x('Please delete 1 character', 'enhanced select', 'woocommerce'), 'i18n_input_too_long_n' => _x('Please delete %qty% characters', 'enhanced select', 'woocommerce'), 'i18n_selection_too_long_1' => _x('You can only select 1 item', 'enhanced select', 'woocommerce'), 'i18n_selection_too_long_n' => _x('You can only select %qty% items', 'enhanced select', 'woocommerce'), 'i18n_load_more' => _x('Loading more results…', 'enhanced select', 'woocommerce'), 'i18n_searching' => _x('Searching…', 'enhanced select', 'woocommerce'), 'ajax_url' => admin_url('admin-ajax.php'), 'search_products_nonce' => wp_create_nonce('search-products'), 'search_customers_nonce' => wp_create_nonce('search-customers')));
wp_enqueue_style('woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION);
wp_enqueue_style('wc-setup', WC()->plugin_url() . '/assets/css/wc-setup.css', array('dashicons', 'install'), WC_VERSION);
wp_register_script('wc-setup', WC()->plugin_url() . '/assets/js/admin/wc-setup.min.js', array('jquery', 'wc-enhanced-select'), WC_VERSION);
wp_localize_script('wc-setup', 'wc_setup_params', array('locale_info' => json_encode(include WC()->plugin_path() . '/i18n/locale-info.php')));
if (!empty($_POST['save_step']) && isset($this->steps[$this->step]['handler'])) {
call_user_func($this->steps[$this->step]['handler']);
}
ob_start();
$this->setup_wizard_header();
$this->setup_wizard_steps();
$this->setup_wizard_content();
$this->setup_wizard_footer();
exit;
}
开发者ID:zengskie,项目名称:Heroku-WordPress-PostgreSQL,代码行数:28,代码来源:class-wc-admin-setup-wizard.php
示例9: render
public function render($template = null, array $arguments = null)
{
if (null === $template) {
return false;
}
$parentTemplate = $this->currentTemplate;
$this->currentTemplate = $this->totalTemplates = $this->totalTemplates + 1;
$path = $this->finder->getPath($template);
if (!is_file($path)) {
throw new \RuntimeException('The requested view file doesn\'t exist in: <strong>' . $path . '</strong>', 404);
}
ob_start();
try {
$this->requireInContext($path, $arguments);
} catch (\Exception $e) {
ob_end_clean();
throw $e;
}
if (isset($this->parent[$this->currentTemplate])) {
$this->data['content'] = ob_get_contents();
ob_end_clean();
$this->render($this->parent[$this->currentTemplate], $arguments);
} else {
ob_end_flush();
}
if ($parentTemplate == 0) {
$this->clean();
} else {
$this->currentTemplate = $parentTemplate;
}
}
开发者ID:hecrj,项目名称:sea_core,代码行数:31,代码来源:Engine.php
示例10: pageStart
function pageStart()
{
if (0 == $this->_bObStarted) {
ob_start();
$this->_bObStarted = 1;
}
}
开发者ID:blas-dmx,项目名称:trident,代码行数:7,代码来源:BxDolModuleTemplate.php
示例11: popular
function popular($skin_dir = 'basic', $pop_cnt = 7, $date_cnt = 3)
{
global $config, $g5;
if (!$skin_dir) {
$skin_dir = 'basic';
}
$date_gap = date("Y-m-d", G5_SERVER_TIME - $date_cnt * 86400);
$sql = " select pp_word, count(*) as cnt from {$g5['popular_table']} where pp_date between '{$date_gap}' and '" . G5_TIME_YMD . "' group by pp_word order by cnt desc, pp_word limit 0, {$pop_cnt} ";
$result = sql_query($sql);
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$list[$i] = $row;
// 스크립트등의 실행금지
$list[$i]['pp_word'] = get_text($list[$i]['pp_word']);
}
ob_start();
if (G5_IS_MOBILE) {
$popular_skin_path = G5_MOBILE_PATH . '/' . G5_SKIN_DIR . '/popular/' . $skin_dir;
$popular_skin_url = G5_MOBILE_URL . '/' . G5_SKIN_DIR . '/popular/' . $skin_dir;
} else {
$popular_skin_path = G5_SKIN_PATH . '/popular/' . $skin_dir;
$popular_skin_url = G5_SKIN_URL . '/popular/' . $skin_dir;
}
include_once $popular_skin_path . '/popular.skin.php';
$content = ob_get_contents();
ob_end_clean();
return $content;
}
开发者ID:ned3y2k,项目名称:youngcart5,代码行数:27,代码来源:popular.lib.php
示例12: render
public function render()
{
extract($this->pageVars);
ob_start();
require $this->template;
echo ob_get_clean();
}
开发者ID:rogerioalbino,项目名称:mvc,代码行数:7,代码来源:AbstractView.php
示例13: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_f6fbb0d538f0cf945a7cc2537fcd6ea50556067234df0d59685d58ab6cd80c70 = $this->env->getExtension("native_profiler");
$__internal_f6fbb0d538f0cf945a7cc2537fcd6ea50556067234df0d59685d58ab6cd80c70->enter($__internal_f6fbb0d538f0cf945a7cc2537fcd6ea50556067234df0d59685d58ab6cd80c70_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@WebProfiler/Profiler/toolbar_item.html.twig"));
// line 1
if (isset($context["link"]) ? $context["link"] : $this->getContext($context, "link")) {
// line 2
echo " ";
ob_start();
// line 3
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("token" => isset($context["token"]) ? $context["token"] : $this->getContext($context, "token"), "panel" => isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"))), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "html", null, true);
echo "</a>\n ";
$context["icon"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
}
// line 6
echo "<div class=\"sf-toolbar-block\">\n <div class=\"sf-toolbar-icon\">";
// line 7
echo twig_escape_filter($this->env, array_key_exists("icon", $context) ? _twig_default_filter(isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "") : "", "html", null, true);
echo "</div>\n <div class=\"sf-toolbar-info\">";
// line 8
echo twig_escape_filter($this->env, array_key_exists("text", $context) ? _twig_default_filter(isset($context["text"]) ? $context["text"] : $this->getContext($context, "text"), "") : "", "html", null, true);
echo "</div>\n</div>\n";
$__internal_f6fbb0d538f0cf945a7cc2537fcd6ea50556067234df0d59685d58ab6cd80c70->leave($__internal_f6fbb0d538f0cf945a7cc2537fcd6ea50556067234df0d59685d58ab6cd80c70_prof);
}
开发者ID:NotBadCode,项目名称:FinanceTest,代码行数:27,代码来源:02d42ef81b938fabb9028e93c7663e4c7dcdca2fdae35e978661f8a8aa0ccd29.php
示例14: _format
private function _format($id, $data, $type)
{
switch ($type) {
case '1':
// json
if (CHARSET == 'gbk') {
$data = array_iconv($data, 'gbk', 'utf-8');
}
return json_encode($data);
break;
case '2':
// xml
$xml = Loader::lib('Xml');
return $xml->xml_serialize($data);
break;
case '3':
// js
Loader::func('dbsource:global');
ob_start();
include template_url($id);
$html = ob_get_contents();
ob_clean();
return format_js($html);
break;
}
}
开发者ID:hubs,项目名称:yuncms,代码行数:26,代码来源:CallController.php
示例15: b_wp_archives_monthly_show
function b_wp_archives_monthly_show($options, $wp_num = "")
{
$block_style = $options[0] ? $options[0] : 0;
$with_count = $options[1] == 0 ? false : true;
global $wpdb, $siteurl, $wp_id, $wp_inblock, $use_cache;
$id = 1;
$use_cache = 1;
if ($wp_num == "") {
$wp_id = $wp_num;
$wp_inblock = 1;
require dirname(__FILE__) . '/../wp-config.php';
$wp_inblock = 0;
}
ob_start();
if ($block_style == 0) {
// Simple Listing
get_archives('monthly', '', 'html', '', '', $with_count);
} else {
// Dropdown Listing
echo '<form name="archiveform' . $wp_num . '" action="">';
echo '<select name="archive_chrono" onchange="window.location = (document.forms.archiveform' . $wp_num . '.archive_chrono[document.forms.archiveform' . $wp_num . '.archive_chrono.selectedIndex].value);"> ';
echo '<option value="">' . _WP_BY_MONTHLY . '</option>';
get_archives('monthly', '', 'option', '', '', $with_count);
echo '</select>';
echo '</form>';
}
$block['content'] = ob_get_contents();
ob_end_clean();
return $block;
}
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:30,代码来源:wp_archives_monthly.php
示例16: content_565ead2acc18a3_66288090
function content_565ead2acc18a3_66288090($_smarty_tpl)
{
echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('wishlistProductsIds' => $_smarty_tpl->tpl_vars['wishlist_products']->value), $_smarty_tpl);
$_smarty_tpl->smarty->_tag_stack[] = array('addJsDefL', array('name' => 'loggin_required'));
$_block_repeat = true;
echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'loggin_required'), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo smartyTranslate(array('s' => 'You must be logged in to manage your wishlist.', 'mod' => 'blockwishlist', 'js' => 1), $_smarty_tpl);
$_block_content = ob_get_clean();
$_block_repeat = false;
echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'loggin_required'), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
$_smarty_tpl->smarty->_tag_stack[] = array('addJsDefL', array('name' => 'added_to_wishlist'));
$_block_repeat = true;
echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'added_to_wishlist'), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo smartyTranslate(array('s' => 'The product was successfully added to your wishlist.', 'mod' => 'blockwishlist', 'js' => 1), $_smarty_tpl);
$_block_content = ob_get_clean();
$_block_repeat = false;
echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'added_to_wishlist'), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('mywishlist_url' => preg_replace("%(?<!\\\\)'%", "\\'", $_smarty_tpl->tpl_vars['link']->value->getModuleLink('blockwishlist', 'mywishlist', array(), true))), $_smarty_tpl);
?>
<?php
}
开发者ID:Nyura95,项目名称:prestashop,代码行数:30,代码来源:15bffc57343dd65e5f46b2604564e9e33408cfad.file.blockwishlist_top.tpl.php
示例17: output_buffering
function output_buffering($setting)
{
//Output Buffering. If needing redirects, try turning this on.
if ($setting == "On") {
ob_start();
}
}
开发者ID:joeflack4,项目名称:VanillaHRM,代码行数:7,代码来源:main_functions.php
示例18: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_47e46a679ebe1f6c3fe3890c127d510e112b274d7f29ddc36299a2ef0416fbee = $this->env->getExtension("native_profiler");
$__internal_47e46a679ebe1f6c3fe3890c127d510e112b274d7f29ddc36299a2ef0416fbee->enter($__internal_47e46a679ebe1f6c3fe3890c127d510e112b274d7f29ddc36299a2ef0416fbee_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@WebProfiler/Profiler/toolbar_item.html.twig"));
// line 1
if (isset($context["link"]) ? $context["link"] : $this->getContext($context, "link")) {
// line 2
echo " ";
ob_start();
// line 3
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("token" => isset($context["token"]) ? $context["token"] : $this->getContext($context, "token"), "panel" => isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"))), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "html", null, true);
echo "</a>\n ";
$context["icon"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
}
// line 6
echo "<div class=\"sf-toolbar-block\">\n <div class=\"sf-toolbar-icon\">";
// line 7
echo twig_escape_filter($this->env, array_key_exists("icon", $context) ? _twig_default_filter(isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "") : "", "html", null, true);
echo "</div>\n <div class=\"sf-toolbar-info\">";
// line 8
echo twig_escape_filter($this->env, array_key_exists("text", $context) ? _twig_default_filter(isset($context["text"]) ? $context["text"] : $this->getContext($context, "text"), "") : "", "html", null, true);
echo "</div>\n</div>\n";
$__internal_47e46a679ebe1f6c3fe3890c127d510e112b274d7f29ddc36299a2ef0416fbee->leave($__internal_47e46a679ebe1f6c3fe3890c127d510e112b274d7f29ddc36299a2ef0416fbee_prof);
}
开发者ID:johnpaulada,项目名称:oauth-api-test,代码行数:27,代码来源:f475485a497ede848cdaab50624ee3f9d4d71ce702f0279c7a1553f20f803767.php
示例19: block_toolbar
public function block_toolbar($context, array $blocks = array())
{
// line 4
echo " ";
if ($this->getAttribute($this->getContext($context, "collector"), "messagecount")) {
// line 5
echo " ";
ob_start();
// line 6
echo " <img width=\"23\" height=\"28\" alt=\"Swiftmailer\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAcCAYAAACK7SRjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0NEOTU1MjM0OThFMTFFMDg3NzJBNTE2ODgwQzMxMzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0NEOTU1MjQ0OThFMTFFMDg3NzJBNTE2ODgwQzMxMzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxMEQ5OTQ5QzQ5OEMxMUUwODc3MkE1MTY4ODBDMzEzNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3Q0Q5NTUyMjQ5OEUxMUUwODc3MkE1MTY4ODBDMzEzNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpkRnSAAAAJ0SURBVHjaYvz//z8DrQATAw3BqOFYAaO9vT1FBhw4cGCAXA5MipxBQUHT3r17l0AVAxkZ/wkLC89as2ZNIcjlYkALXKnlWqBZTH/+/PEDmQsynLW/v3+NoaHhN2oYDjJn8uTJK4BMNpDhPwsLCwOKiop2+fn5vafEYC8vrw8gc/Lz8wOB3B8gw/nev38vn5WV5eTg4LA/Ly/vESsrK2npmYmJITU19SnQ8L0gc4DxpwgyF2S4EEjB58+f+crLy31YWFjOt7S0XBYUFPxHjMEcHBz/6+rqboqJiZ0qKSnxBpkDlRICGc4MU/j792+2CRMm+L18+fLSxIkTDykoKPzBZ7CoqOi/np6eE8rKylvb29v9fvz4wYEkzYKRzjk5OX/LyMjcnDRpEkjjdisrK6wRraOj8wvokAMLFy788ejRoxcaGhrPCWai4ODgB8DUE3/mzBknYMToASNoMzAfvEVW4+Tk9LmhoWFbTU2NwunTpx2BjiiMjo6+hm4WCzJHUlLyz+vXrxkfP36sDOI/ffpUPikpibe7u3sLsJjQW7VqlSrQxe+Avjmanp7u9PbtWzGQOmCCkARmmu/m5uYfT548yY/V5UpKSl+2b9+uiiz26dMnIWBSDTp27NgdYGrYCIzwE7m5uR4wg2Hg/PnzSsDI/QlKOcjZ3wGUBLm5uf+DwLdv38gub4AG/xcSEvr35s0bZmCB5sgCE/z69SsjyDJKMtG/f/8YQQYD8wkoGf8H51AbG5sH1CpbQBnQ09PzBiiHgoIFFHlBQGwLxLxUMP8dqJgH4k3gIhfIkAKVYkDMTmmhCHIxEL8A4peMo02L4WU4QIABANxZAoDIQDv3AAAAAElFTkSuQmCC\" />\n <span class=\"sf-toolbar-status\">";
// line 7
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "collector"), "messageCount"), "html", null, true);
echo "</span>\n ";
$context["icon"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
// line 9
echo " ";
ob_start();
// line 10
echo " <div class=\"sf-toolbar-info-piece\">\n <b>Messages</b>\n <span>";
// line 12
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "collector"), "messageCount"), "html", null, true);
echo "</span>\n </div>\n <div class=\"sf-toolbar-info-piece\">\n <b>Is spooled ?</b>\n <span>";
// line 16
echo $this->getAttribute($this->getContext($context, "collector"), "isSpool") ? "yes" : "no";
echo "</span>\n </div>\n ";
$context["text"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
// line 19
echo " ";
$this->env->loadTemplate("WebProfilerBundle:Profiler:toolbar_item.html.twig")->display(array_merge($context, array("link" => $this->getContext($context, "profiler_url"))));
// line 20
echo " ";
}
}
开发者ID:nsteenv,项目名称:bewelcome-symfony,代码行数:33,代码来源:df9ad58db2ef01bd996578be15fd.php
示例20: index
/**
* 首页
*/
public function index()
{
$file = FCPATH . 'cache/index/home-' . ($this->template->mobile ? 'mb-' : '') . SITE_ID . '.html';
// 系统开启静态首页、静态文件不存在时,才生成文件
//zjp添加,动态显示日期天气温度
if ($_SESSION["de_json"] == '') {
$city = "宜春";
$content = file_get_contents("http://api.map.baidu.com/telematics/v3/weather?location=宜春&output=json&ak=i8GFDZTM22uqICZbtioaVbnk");
$de_json = json_decode($content, TRUE);
$_SESSION["de_json"] = $de_json;
}
/*zjp 0819 添加调取最新的调查问卷start*/
//echo APP_DIR;
//echo 1;
//$this->load->model('category_model');
//$question_id = $this->category_model->get_question_id();
/*zjp 0819 添加调取最新的调查问卷end */
if (SITE_HOME_INDEX && !is_file($file)) {
ob_start();
$this->template->assign(array('indexc' => 1, 'meta_title' => SITE_TITLE, 'meta_keywords' => SITE_KEYWORDS, 'meta_description' => SITE_DESCRIPTION, 'de_json' => $_SESSION["de_json"]));
$this->template->display('index.html');
$html = ob_get_clean();
@file_put_contents($file, $html, LOCK_EX);
echo $html;
exit;
} else {
$this->template->assign(array('indexc' => 1, 'meta_title' => SITE_TITLE, 'meta_keywords' => SITE_KEYWORDS, 'meta_description' => SITE_DESCRIPTION, 'de_json' => $de_json));
$this->template->display('index.html');
}
}
开发者ID:Thebeautifullife,项目名称:yichunchengguan,代码行数:33,代码来源:Home.php
注:本文中的ob_start函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论