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


PHP pre_start函数代码示例

本文整理汇总了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;未经允许,请勿转载。