當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Toolbox::GetRequest方法代碼示例

本文整理匯總了PHP中Toolbox::GetRequest方法的典型用法代碼示例。如果您正苦於以下問題:PHP Toolbox::GetRequest方法的具體用法?PHP Toolbox::GetRequest怎麽用?PHP Toolbox::GetRequest使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Toolbox的用法示例。


在下文中一共展示了Toolbox::GetRequest方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _InitStatus

 /**
  * Initialize status.
  */
 private function _InitStatus()
 {
     //	Get form name.
     $form_name = $this->Config()->form_name();
     //	Check secure.
     if (!$this->Form()->Secure($form_name)) {
         //	Form page.
         $this->_status = self::_STATUS_FORM_;
     } else {
         //	Secured.
         if (!Toolbox::GetRequest('confirmed')) {
             //	Confirmation page.
             $this->_status = self::_STATUS_CONFIRM_;
         } else {
             //	Confirmed.
             $this->_status = self::_STATUS_CONFIRMED_;
             if ($this->Mail()) {
                 //	Send mail was successful.
                 $this->_status = self::_STATUS_SUCCESSED_;
                 $this->Form()->Clear($form_name);
             } else {
                 //	Failed to send mail.
                 $this->_status = self::_STATUS_FAILED_;
                 $this->_error = $this->i18n()->En('Failed to send mail.');
             }
         }
     }
 }
開發者ID:TomoakiNagahara,項目名稱:op-unit-contact,代碼行數:31,代碼來源:Contact.model.php

示例2: error_reporting

 */
/****************************************************************************************************
 *
 * OnePiece
 *
 ****************************************************************************************************/
//	Include of OnePiece framework.
include '/www/op/core/OnePiece5.class.php';
//	Set administrator setting.
Env::Set('admin-ip', '');
Env::Set('admin-mail', '');
//	Re:Setting error reporting.
error_reporting(E_ALL & ~E_NOTICE);
ini_set('display_errors', 0);
//	Re:Set Debug mode.
if (OnePiece5::Admin() and Toolbox::GetRequest('debug')) {
    error_reporting(E_ALL & ~E_NOTICE);
    ini_set('display_errors', 1);
}
//	Instanciate.
$op = new OnePiece5();
//	Include configuration file.
if (file_exists('config.inc.php')) {
    include 'config.inc.php';
}
/****************************************************************************************************
 * 
 * Dispatch
 * 
 ****************************************************************************************************/
//	Remove URL Query.
開發者ID:TomoakiNagahara,項目名稱:op-fullscratch,代碼行數:31,代碼來源:app.php

示例3: explode

/**
 * op-unit-markdown/index.php
 *
 * @creation  2015-12-05
 * @version   1.0
 * @package   op-unit-markdown
 * @author    Tomoaki Nagahara <tomoaki.nagahara@gmail.com>
 * @copyright Tomoaki Nagahara All right reserved.
 */
//	Do check of include.
if (!class_exists('OnePiece5')) {
    require '';
}
//	Set route table.
Env::Set('controller-name', 'index,php');
Env::Set('route', Router::GetRoute());
//	Init of unit root directory.
if (!($root = Env::Get('unit-root'))) {
    $root = explode('/', dirname($_SERVER['SCRIPT_FILENAME']));
    $root[count($root) - 1] = null;
    $root = join('/', $root);
    Env::Set('unit-root', $root);
}
//	Instanciate
$op = new OnePiece5();
if (Toolbox::GetRequest('testcase')) {
    $op->Template('testcase.php');
} else {
    $op->Template('action.php');
}
開發者ID:TomoakiNagahara,項目名稱:op-unit-markdown,代碼行數:30,代碼來源:index.php

示例4: microtime

/**
 *  Set OnePiece directory.
 * 
 *  Example:
 *  $op_dir = '/www/op-core';
 *  $op_dir = 'C:\www\op-core';
 */
$op_dir = '/www/op/core';
//  Start time.
$st = microtime(true);
//  Init op-core
include './app/template/init-op-core.php';
//  Create App object.
$app = new App_i18n();
//	Import config file.(setting file)
$app->Import('app/config.php');
//  Dispatch to end-point.
$app->Dispatch();
//	Access is from web browser.
if (Toolbox::isHtml()) {
    //	Display of ip address.
    if (Toolbox::GetRequest('admin')) {
        $app->p($_SERVER['REMOTE_ADDR']);
    }
    //  memory check.
    $app->mark('memory check');
    //  Finish time.
    $en = microtime(true);
    //  Will to display the execution time.
    printf('<div style="font-size:smaller;">Execute time is %s seconds.</div>', $en - $st);
}
開發者ID:TomoakiNagahara,項目名稱:kung-fu.tokyo.jp,代碼行數:31,代碼來源:app.php

示例5: Model_Markdown

<?php

/**
 * op-unit-markdown/action.php
 *
 * @creation  2015-11-15
 * @version   1.0
 * @package   op-unit-markdown
 * @author    Tomoaki Nagahara <tomoaki.nagahara@gmail.com>
 * @copyright Tomoaki Nagahara All right reserved.
 */
//	Markdown
include './Markdown.model.php';
$md = new Model_Markdown();
$html = null;
if ($file = Toolbox::GetRequest('file')) {
    $html .= $md->toHtml("testcase/{$file}.md");
} else {
    $html .= $md->toHtml('testcase/headline.md');
    $html .= $md->toHtml('testcase/list.md');
    $html .= $md->toHtml('testcase/paragraph.md');
    $html .= $md->toHtml('testcase/decoration.md');
    $html .= $md->toHtml('testcase/anchor.md');
    $html .= $md->toHtml('testcase/image.md');
    $html .= $md->toHtml('testcase/code.md');
    $html .= $md->toHtml('testcase/blockquote.md');
}
//	Load index template.
$this->Template('index.phtml', array('html' => $html));
開發者ID:TomoakiNagahara,項目名稱:op-unit-markdown,代碼行數:29,代碼來源:action.php


注:本文中的Toolbox::GetRequest方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。