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


PHP Control::error方法代码示例

本文整理汇总了PHP中Control::error方法的典型用法代码示例。如果您正苦于以下问题:PHP Control::error方法的具体用法?PHP Control::error怎么用?PHP Control::error使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Control的用法示例。


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

示例1: error

 /**
  * 错误输出
  * @param string $msg 提示内容
  * @param string $url 跳转URL
  * @param int $time 跳转时间
  * @param null $tpl 模板文件
  */
 protected function error($msg = '出错了', $url = NULL, $time = 2, $tpl = null)
 {
     if (IS_AJAX) {
         $this->_ajax(0, $msg);
     } else {
         parent::error($msg, $url, $time, $tpl);
     }
 }
开发者ID:jyht,项目名称:v5,代码行数:15,代码来源:CommonControl.class.php

示例2: insert

 public static function insert($vars)
 {
     if (is_array($vars)) {
         $ins = array('table' => 'options', 'name' => $vars['name'], 'value' => $vars['value']);
         $opt = Db::insert($ins);
     } else {
         Control::error('unknown', 'Format not Found, please in array');
     }
     return $opt;
 }
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:10,代码来源:Options.class.php

示例3: theme

 public static function theme($var, $data = '')
 {
     if (isset($data)) {
         # code...
         $GLOBALS['data'] = $data;
     }
     if (self::exist($var)) {
         include GX_THEME . THEME . '/' . $var . '.php';
     } else {
         Control::error('unknown', 'Theme file is missing.');
     }
 }
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:12,代码来源:Theme.class.php

示例4: admin

 /**
  * GxMain Admin Function.
  * This will load the backend controller. Secured, so to access it must be 
  * logged in with a current privilege. Default privilege is 2.
  * 
  * @author Puguh Wijayanto (www.metalgenix.com)
  * @since 0.0.1
  */
 public function admin()
 {
     Session::start();
     User::secure();
     System::gZip();
     if (User::access(2)) {
         Control::handler('backend');
     } else {
         Theme::admin('header');
         Control::error('noaccess');
         Theme::admin('footer');
     }
     System::Zipped();
 }
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:22,代码来源:GxMain.class.php

示例5: extract

 $Planche->setClient($client);
 socket_getpeername($client, $sClientIp, $nClientPort);
 $sRequestHeader = socket_read($client, 1024);
 $GET = http_parse_headers($sRequestHeader, 'GET');
 $POST = http_parse_headers($sRequestHeader, 'POST');
 $REQUEST = array_merge($GET, $POST);
 if ($REQUEST['URL'] == '/favicon.ico') {
     socket_close($client);
     continue;
 }
 if (@$REQUEST['PARAMS']['callback']) {
     //echo "JSON Callback : ".$REQUEST['PARAMS']['callback']."\n";
     $Planche->setCallback($REQUEST['PARAMS']['callback']);
 }
 if (isset($REQUEST['PARAMS']) === false) {
     $Planche->error('Invalid request');
     socket_close($client);
     continue;
 }
 if (isset($REQUEST['PARAMS']['cmd']) === false) {
     $Planche->error('Invalid request');
     socket_close($client);
     continue;
 }
 extract(json_decode(base64_decode($REQUEST['PARAMS']['cmd']), true));
 echo "Execute Query\n";
 echo "Connect {$host}, {$user}, **************, {$db}\n";
 if ($Planche->connect($host, $user, $pass, $db)) {
     echo "Connection Successful\n";
     echo "The execution SQL is\n";
     print_r($query);
开发者ID:kwanho00961,项目名称:planche,代码行数:31,代码来源:planche_tnl.php

示例6: query

 /**
  * Database Query Function.
  * This will proccess database query. 
  *
  * @param string $vars 
  * 
  * @author Puguh Wijayanto (www.metalgenix.com)
  * @since 0.0.1
  */
 public static function query($vars)
 {
     if (DB_DRIVER == 'mysql') {
         mysql_query('SET CHARACTER SET utf8');
         $q = mysql_query($vars) or die(mysql_error());
     } elseif (DB_DRIVER == 'mysqli') {
         self::$mysqli->set_charset("utf8");
         $q = self::$mysqli->query($vars);
         if ($q === false) {
             Control::error('db', "Query failed: " . self::$mysqli->error . "<br />\n");
         }
     }
     return $q;
 }
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:23,代码来源:Db.class.php

示例7: foreach

</a> on <?php 
echo Date::local($data['posts'][0]->date);
?>
</span>
                    </div>
                </div>
            </div>
        </div>
    </header>

    <!-- Post Content -->
    <article>
        <div class="container">
            <div class="row">
                <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <?php 
if (isset($data['posts'][0]->title)) {
    foreach ($data['posts'] as $p) {
        # code...
        echo "\n                            <div class=\"\">\n                                " . Posts::content($p->content) . "\n                            </div>\n                            <hr />\n                            <div class=\"col-sm-12\">\n                                <div class=\"row\">\n                                <h3>Comments</h3>\n                                <div class=\"fb-comments\" data-href=\"http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}\" data-width=\"100%\" data-numposts=\"5\" data-colorscheme=\"light\"></div>\n                                </div>\n                            </div>\n                                ";
    }
} else {
    //echo "Error, Post not found.";
    Control::error('404');
}
?>
                </div>
            </div>
        </div>
    </article>
开发者ID:vdanelia,项目名称:GeniXCMS,代码行数:30,代码来源:single.php


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