當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。