• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP pre_start函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: pre_start

pre_start();
?>
/*
UPDATE bugs SET updated_on='2007-03-23',bug_status='FIXED' WHERE bug_id = 4
*/

$data = array(
    'updated_on'      => '2007-03-23',
    'bug_status'      => 'FIXED'
);

$n = $db->update('bugs', $data, 'bug_id = ?', $bug_id);
<?php 
pre_end();
?>

<h2>Deleting Data</h2>

<p> The <b>delete()</b> method takes a table name as first argument. The second argument is the criteria, 
    which can take binding parameters. Be careful because the criteria is optional.

<?php 
pre_start();
?>
// => DELETE FROM users
$db->delete('users');    

// => DELETE FROM users WHERE userid = 50
$db->delete('users', 'userid = ?', $user_id);
<?php 
pre_end();
开发者ID:nikitakit,项目名称:RevTK,代码行数:31,代码来源:coreDatabaseView.php


示例2: directory

config_dir                 # defaults to CORE_ROOT_DIR/config

# Application directories
app_dir                    # defaults to CORE_ROOT_DIR/apps/[appname]
app_config_dir             # defaults to CORE_ROOT_DIR/apps/[appname]/config
app_lib_dir                # defaults to CORE_ROOT_DIR/apps/[appname]/lib
app_module_dir             # defaults to CORE_ROOT_DIR/apps/[appname]/modules
app_template_dir           # defaults to CORE_ROOT_DIR/apps/[appname]/templates

sf_web_dir                 # defaults to CORE_ROOT_DIR/web
sf_upload_dir              # defaults to CORE_ROOT_DIR/web/uploads
sf_cache_dir               # cache root directory (sfCache)
sf_root_dir                # project root directory
sf_symfony_lib_dir         # where to autoload symfony classes from
sf_charset                 # defaults to 'utf-8'
sf_test                    # defaults to CORE_DEBUG (front controller)
sf_debug                   # defaults to CORE_DEBUG (front controller)
sf_compressed              # defaults to enabled if support detected
<?php 
pre_end();
?>
<h2>Example</h2>

<p> These are all current coreConfig settings:
<?php 
pre_start('printr');
print_r(coreConfig::getAll());
pre_end();
?>

开发者ID:nikitakit,项目名称:RevTK,代码行数:29,代码来源:coreConfigView.php


示例3: factory

	with the <b>core_factories</b> setting. For each configurable factory, you can provide
	a custom class that will be used by the framework instead of the Core class.

<p> These are the configurable factories, the setting name, and the class that you need
    to extend if replacing the Core class:

<ul>
	<li><b>user</b> : extend <em>coreUserBasicSecurity</em></li>
	<li><b>request</b> : extend <em>coreWebRequest</em></li>
	<li><b>response</b> : extend <em>coreWebResponse</em></li>
</ul>

<p> Here we replace the user factory (coreUserBasicSecurity) with myUser:

<?php 
pre_start('info');
?>
// myUser.php
class myUser extends coreUserBasicSecurity
{
  public function initialize(coreSessionStorage $storage, $options = array())
  {
    parent::initialize($storage, $options);
	
    // Add our initialization code...
  }

  // Add our methods...

  public function signIn($signInName, $credentials = array())
  {
开发者ID:kc5nra,项目名称:RevTK,代码行数:31,代码来源:miscSettingsView.php


示例4: onDefault

// Subscribe the default callback for events bubbling up to
// the root element. Use e.target in this handler to get the
// element that started the event chain, otherwise "el" will be the root element.
onDefault(fn[, scope])
                           
// Cleanup the event listener from the DOM.
destroy()
<?php 
pre_end();
?>
  

<h2>Callback signature:</h2>

<p> The callback receives the event object, and the current element in the bubble chain.
    Usually matchedEl is the element with the class name that was registered with on().
</p>
<p> When using onDefault(), matchedEl is always the root element. To get the element that started
    the event chain use <samp>e.target</samp>.
</p>    
<p> Return <strong>false</strong> explicitly to stop the event and interrupt the event chain.
    Otherwise the event will continue bubbling up to the onDefault() handler if set,
    or the default element behaviour (links, form submit button, etc).
</p>

<?php 
pre_start('js');
?>
myCallback(e, matchedEl)
<?php 
pre_end();
开发者ID:nikitakit,项目名称:RevTK,代码行数:31,代码来源:_ui_eventdelegatorView.php


示例5: pre_start

<?php 
pre_start('js');
?>
Core.ready(function() {
  var ajaxTable = new Core.Ui.AjaxTable(Core.Ui.get('MembersListComponent'));
});
<?php 
pre_end();
?>

<p>The component's view returns a FORM element and the table code. The FORM element
   is output by the form_tag() helper (FormHelper). The form's action attribute 
   (the ajax url) and the method (post) will be used by AjaxPanel for the request.</p>
   
<?php 
pre_start('code');
?>
&lt;?php use_helper('Form') ?>

&lt;?php echo form_tag('corejs/ajaxtable') ?>
  &lt;?php echo input_hidden_tag('hidden1', 'foobar') ?>
&lt;/form>

&lt;table cellspacing="0" class="tabular">
  ...
&lt;/table>
<?php 
pre_end();
?>

<script type="text/javascript">
开发者ID:nikitakit,项目名称:RevTK,代码行数:31,代码来源:_ui_ajaxtableView.php


示例6: use_helper

<?php

use_helper('Widgets');
?>

<h3>Markup reference:</h3>

<?php 
pre_start('html');
?>
<div class="uiProgressBar">
  <div>
    <span class="g" title="30 of 50" style="width:60%"></span>
    <span class="r" title="5 of 50" style="width:10%"></span>
  </div>
</div>
<?php 
pre_end();
?>

<h2>ui_progress_bar() helper</h2>

<?php 
echo ui_progress_bar(array(array('value' => 75), array('value' => 0, 'label' => 'custom label', 'class' => 'r')), 100, array('id' => 'custom_id'));
?>

<p>With custom border color:</p>

<?php 
echo ui_progress_bar(array(array('value' => 75), array('value' => 0, 'label' => 'custom label', 'class' => 'r')), 100, array('borderColor' => '#A1A1A1'));
开发者ID:kc5nra,项目名称:RevTK,代码行数:30,代码来源:_widgets_progressbarView.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP precision_timer函数代码示例发布时间:2022-05-15
下一篇:
PHP pre_schema_upgrade函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap