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

PHP print_error_msg函数代码示例

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

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



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

示例1: getExpressionTree

 function getExpressionTree($expr)
 {
     global $g_sqlSingleRecFuncs;
     $parser = new SqlParser($expr);
     $king_expr = new Expression();
     $current_expr =& $king_expr;
     while (!is_empty_str($elem = $parser->parseNextElementRaw())) {
         // function or IN / NOT IN?
         if (in_array(strtoupper($elem), $g_sqlSingleRecFuncs) || strtoupper($elem) == "IN" || strtoupper($elem) == "NOT IN") {
             $current_expr->expr_str .= $elem . " ";
             $elem = $parser->parseNextElementRaw();
             if ($elem != "(") {
                 print_error_msg("( expected after " . $current_expr->expr_str);
                 return null;
             }
             $current_expr->expr_str .= $elem;
             while (!is_empty_str($elem = $parser->parseNextElementRaw()) && $elem != ")") {
                 $current_expr->expr_str .= $elem;
             }
             $current_expr->expr_str .= $elem . " ";
             continue;
         }
         if ($elem == "(") {
             $current_expr->expr_str .= " % ";
             unset($new_expr);
             $new_expr = new Expression("");
             $current_expr->addChild($new_expr);
             $new_expr->setParent($current_expr);
             unset($current_expr);
             $current_expr =& $new_expr;
         } else {
             if ($elem == ")") {
                 unset($tmp);
                 $tmp =& $current_expr->getParent();
                 unset($current_expr);
                 $current_expr =& $tmp;
             } else {
                 // no spaces on .'s
                 if ($elem == ".") {
                     remove_last_char($current_expr->expr_str);
                     $current_expr->expr_str .= $elem;
                 } else {
                     $current_expr->expr_str .= $elem . " ";
                 }
             }
         }
     }
     return $king_expr;
 }
开发者ID:yunsite,项目名称:mapleleaf,代码行数:49,代码来源:expression.php


示例2: db_query

    exit;
}
$check_name_ndl = '';
if ($pha_nhom_duoc_ly_id != 0) {
    $check_name_ndl = new db_query('SELECT phg_name 
                                  FROM pharma_group 
                                  WHERE phg_id = "' . $pha_nhom_duoc_ly_id . '" 
                                  LIMIT 1');
    $check_name_ndl = mysqli_fetch_assoc($check_name_ndl->result);
    $check_name_ndl = $check_name_ndl['phg_name'];
}
#Phần hiển thị
$rainTpl = new RainTPL();
$rainTpl->assign('load_header', $load_header);
$rainTpl->assign('module_name', $module_name);
$rainTpl->assign('error_msg', print_error_msg($bg_errorMsg));
$html_page = '';
$form = new form();
$html_page .= $form->form_open();
$html_page .= $form->textnote('Các trường có dấu (<span class="form-asterick">*</span>) là bắt buộc nhập');
/**
 * something here
 */
$html_page .= $form->text(array('label' => 'Tên thuốc', 'name' => 'pha_name', 'id' => 'pha_name', 'value' => $pha_name, 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tên thuốc', 'placeholder' => 'tên thuốc', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Tiêu đề thuốc', 'name' => 'pha_title', 'id' => 'pha_title', 'value' => $pha_title, 'require' => 1, 'errorMsg' => 'Bạn chưa nhập tiêu đề thuốc', 'placeholder' => 'tiêu đề thuốc', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Mô tả', 'name' => 'pha_description', 'id' => 'pha_description', 'value' => $pha_description, 'require' => 0, 'placeholder' => 'Mô tả thuốc', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->textarea(array('label' => 'Nội dung', 'name' => 'pha_content', 'id' => 'pha_content', 'value' => $pha_content, 'require' => 0, 'placeholder' => 'Nội dung thuốc', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Mã đăng ký', 'name' => 'pha_so_dang_ky', 'id' => 'pha_so_dang_ky', 'value' => $pha_so_dang_ky, 'require' => 1, 'placeholder' => 'Mã đăng ký', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Dạng bào chế', 'name' => 'pha_dang_bao_che', 'id' => 'pha_dang_bao_che', 'value' => $pha_dang_bao_che, 'require' => 1, 'placeholder' => 'Dạng bào chế', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Đóng gói', 'name' => 'pha_dong_goi', 'id' => 'pha_dong_goi', 'value' => $pha_dong_goi, 'require' => 0, 'placeholder' => 'Pha đóng gói', 'isdatepicker' => 0, 'helpblock' => ''));
$html_page .= $form->text(array('label' => 'Giá bán buôn', 'name' => 'pha_gia_buon', 'id' => 'pha_gia_buon', 'value' => $pha_gia_buon, 'require' => 0, 'placeholder' => '', 'isdatepicker' => 0, 'helpblock' => ''));
开发者ID:virutmath,项目名称:suckhoe,代码行数:31,代码来源:edit.php


示例3: print_error_msg

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="vi" lang="vi" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php 
echo $load_header;
?>
</head>
<body>
<div class="module_header bold fix"><?php 
echo $module_name;
?>
</div>
<div id="wrapper">
    <?php 
print_error_msg($bg_errorMsg);
?>
	<?php 
$form = new form();
?>
    <script>
    var News = new News();
    </script>
	<?php 
echo $form->form_open();
?>
    <?php 
echo $form->textnote('Các trường có dấu (<span class="form-asterick">*</span>) là bắt buộc nhập');
?>
	
    <?php 
开发者ID:virutmath,项目名称:suckhoe,代码行数:31,代码来源:edit.php


示例4: executeSelectQuery

 function executeSelectQuery(&$sqlQuery)
 {
     global $g_sqlGroupingFuncs;
     global $g_sqlSingleRecFuncs;
     $resultSets = array();
     // create a copy
     $aliases = $sqlQuery->colAliases;
     $funcs = $sqlQuery->colFuncs;
     // Read all Tables
     for ($i = 0; $i < count($sqlQuery->tables); ++$i) {
         debug_printb("<br>[executeSelectQuery] Reading table " . $sqlQuery->tables[$i] . "<br>");
         if (!($resultSets[$i] = $this->readTable($sqlQuery->tables[$i]))) {
             print_error_msg("Reading Table " . $sqlQuery->tables[$i] . " failed");
             return false;
         }
         $resultSets[$i]->setColumnTableForAll($sqlQuery->tables[$i]);
         $resultSets[$i]->setColumnTableAliasForAll($sqlQuery->tableAliases[$i]);
         // set all functions to the ResultSet of the current table
         // if table and column name matches
         debug_printb("[executeSelectQuery] Setting functions for the current table:<br>");
         for ($j = 0; $j < count($funcs); ++$j) {
             if (!$funcs[$j] || !$sqlQuery->colNames[$j]) {
                 continue;
             }
             if ($sqlQuery->colTables[$j] == $sqlQuery->tables[$i] || $sqlQuery->colTables[$j] == $sqlQuery->tableAliases[$i]) {
                 $colNr = $resultSets[$i]->findColNrByAttrs($sqlQuery->colNames[$j], $sqlQuery->colTables[$j], "");
                 if ($colNr == NOT_FOUND) {
                     continue;
                 }
                 // create a new column for each function
                 $resultSets[$i]->addColumn($sqlQuery->colNames[$j], $sqlQuery->colAliases[$j], $sqlQuery->colTables[$j], "", "str", "", $funcs[$j], "", true);
                 $funcs[$j] = "";
             }
         }
         // set all aliases where table, column name and function matches
         debug_printb("[executeSelectQuery] Setting aliases for the current table:<br>");
         for ($j = 0; $j < count($aliases); ++$j) {
             if (!$aliases[$j]) {
                 continue;
             }
             if ($sqlQuery->colTables[$j] == $sqlQuery->tables[$i] || $sqlQuery->colTables[$j] == $sqlQuery->tableAliases[$i]) {
                 if (($colNr = $resultSets[$i]->findColNrByAttrs($sqlQuery->colNames[$j], $sqlQuery->colTables[$j], $sqlQuery->colFuncs[$j])) != NOT_FOUND) {
                     $resultSets[$i]->setColumnAlias($colNr, $aliases[$j]);
                     $aliases[$j] = "";
                 }
             }
         }
         if (TXTDBAPI_DEBUG) {
             debug_printb("<br>[executeSelectQuery] Dump of Table {$i} (" . $sqlQuery->tables[$i] . "):<br>");
             $resultSets[$i]->dump();
         }
     }
     // set remaining functions to the ResultSet where column name matches
     debug_printb("[executeSelectQuery] Setting remaining functions where column name matches:<br>");
     for ($i = 0; $i < count($resultSets); ++$i) {
         for ($j = 0; $j < count($funcs); ++$j) {
             if (!$funcs[$j] || !$sqlQuery->colNames[$j]) {
                 continue;
             }
             $colNr = $resultSets[$i]->findColNrByAttrs($sqlQuery->colNames[$j], "", "");
             if ($colNr == NOT_FOUND) {
                 // 'text' or 123 ? => add column
                 if (!(is_numeric($sqlQuery->colNames[$j]) || has_quotes($sqlQuery->colNames[$j]))) {
                     continue;
                 }
                 debug_print("Adding function with quoted string or number paremeter!<br>");
             }
             // create a new column for each function
             $resultSets[$i]->addColumn($sqlQuery->colNames[$j], $sqlQuery->colAliases[$j], $sqlQuery->colTables[$j], "", "str", "", $funcs[$j], "", true);
             $funcs[$j] = "";
         }
     }
     // set remaining aliases where column name and function matches
     debug_printb("[executeSelectQuery] Setting remaining aliases where column name and function matches:<br>");
     for ($i = 0; $i < count($resultSets); ++$i) {
         for ($j = 0; $j < count($aliases); ++$j) {
             if (!$aliases[$j]) {
                 continue;
             }
             if (($colNr = $resultSets[$i]->findColNrByAttrs($sqlQuery->colNames[$j], "", $sqlQuery->colFuncs[$j])) != NOT_FOUND) {
                 $resultSets[$i]->setColumnAlias($colNr, $aliases[$j]);
                 $aliases[$j] = "";
             }
         }
     }
     debug_printb("[executeSelectQuery] Executing single-rec functions (on the separate ResultSet's):<br>");
     // execute single-rec functions (on the separate ResultSet's)
     for ($i = 0; $i < count($resultSets); ++$i) {
         $resultSets[$i]->executeSingleRecFuncs();
     }
     // A query without tables ? => make a dummy ResultSet
     $dummyResultSet = false;
     if (count($sqlQuery->tables) == 0) {
         $dummyResultSet = true;
         $rsMaster = new ResultSet();
         $rsMaster->addColumn("(dummy)", "(dummy)", "(dummy)", "(dummy)", "str", "(dummy)", "", "", true);
         $rsMaster->append();
         // else: real ResultSet
     } else {
         $dummyResultSet = false;
//.........这里部分代码省略.........
开发者ID:Kent-Liang,项目名称:Network-Security,代码行数:101,代码来源:database.php


示例5: parseResultSetFromFileForAppend

 function parseResultSetFromFileForAppend($fd)
 {
     $start = getmicrotime();
     $rs = new ResultSet();
     // COLUMN NAMES
     // read with a maximum of 1000 bytes, until there is a newline included (or eof)
     $buf = "";
     while (is_false(strstr($buf, "\n"))) {
         $buf .= fgets($fd, 1000);
         if (feof($fd)) {
             print_error_msg("Invalid Table File!<br>");
             return null;
         }
     }
     // remove newline
     remove_last_char($buf);
     $rec = $this->parseRowFromLine($buf);
     $rs->setColumnNames($rec);
     // COLUMN TYPES
     // read with a maximum of 1000 bytes, until there is a newline included (or eof)
     $buf = "";
     while (is_false(strstr($buf, "\n"))) {
         $buf .= fgets($fd, 1000);
         if (feof($fd)) {
             print_error_msg("Invalid Table File!<br>");
             return null;
         }
     }
     // remove newline
     remove_last_char($buf);
     $rec = $this->parseRowFromLine($buf);
     $rs->setColumnTypes($rec);
     // COLUMN DEFAULT VALUES
     // read with a maximum of 1000 bytes, until there is a newline included (or eof)
     $buf = "";
     while (is_false(strstr($buf, "\n"))) {
         $buf .= fgets($fd, 1000);
         if (feof($fd)) {
             break;
             // there's no newline after the colum types => empty table
         }
     }
     // remove newline
     if (last_char($buf) == "\n") {
         remove_last_char($buf);
     }
     $rec = $this->parseRowFromLine($buf);
     $rs->setColumnDefaultValues($rec);
     // get file size
     fseek($fd, 0, SEEK_END);
     $size = ftell($fd);
     $lastRecSize = min($size, ASSUMED_RECORD_SIZE);
     $lastRecPos = false;
     while (is_false($lastRecPos)) {
         fseek($fd, -$lastRecSize, SEEK_END);
         $buf = fread($fd, $lastRecSize);
         $lastRecSize = $lastRecSize * 2;
         $lastRecSize = min($size, $lastRecSize);
         if ($lastRecSize < 1) {
             print_error_message("lastRecSize should not be 0! Contact developer please!");
         }
         $lastRecPos = $this->getLastRecordPosInString($buf);
         if (TXTDBAPI_VERBOSE_DEBUG) {
             echo "<hr>pass! <br>";
             echo "lastRecPos: " . $lastRecPos . "<br>";
             echo "buf: " . $buf . "<br>";
         }
     }
     $buf = trim(substr($buf, $lastRecPos));
     verbose_debug_print("buf after substr() and trim(): " . $buf . "<br>");
     $rs->reset();
     $row = $this->parseRowFromLine($buf);
     if (TXTDBAPI_VERBOSE_DEBUG) {
         echo "parseResultSetFromFileForAppend(): last Row:<br>";
         print_r($row);
         echo "<br>";
     }
     $rs->appendRow($row);
     $rs->setColumnAliases(create_array_fill(count($rs->colNames), ""));
     $rs->setColumnTables(create_array_fill(count($rs->colNames), ""));
     $rs->setColumnTableAliases(create_array_fill(count($rs->colNames), ""));
     $rs->setColumnFunctions(create_array_fill(count($rs->colNames), ""));
     $rs->colFuncsExecuted = create_array_fill(count($rs->colNames), false);
     debug_print("<i>III: parseResultSetFromFileForAppend: " . (getmicrotime() - $start) . " seconds elapsed</i><br>");
     return $rs;
 }
开发者ID:Giannos99,项目名称:HC_Interaction,代码行数:86,代码来源:resultset.php


示例6: test

 function test()
 {
     return true;
     // return true, function is outdated TODO: update
     reset($this->colNames);
     for ($i = 0; $i < count($this->colNames); ++$i) {
         if ($this->colNames[$i] == "*") {
             if ($this->colAliases[$i]) {
                 print_error_msg("Cannot define Alias by a *");
                 return FALSE;
             }
             continue;
         }
         if ($key = array_search($this->colNames[$i], $this->colNames)) {
             if ($i == $key) {
                 continue;
             }
             if ($this->colAliases[$i] == $this->colAliases[$key] && $this->colFuncs[$i] == $this->colFuncs[$key]) {
                 print_error_msg("Two Columns with the same name use no or the same alias ('" . $this->colNames[$i] . "', '" . $this->colNames[$key] . "')");
                 return FALSE;
             }
             if (!$this->colTables[$i]) {
                 print_error_msg("Column " . $this->colNames[$i] . " could belong to multiple Tables");
                 return FALSE;
             }
         }
     }
     reset($this->colAliases);
     for ($i = 0; $i < count($this->colAliases); ++$i) {
         if ($key = array_search($this->colAliases[$i], $this->colAliases)) {
             if ($i == $key || $this->colAliases[$i] == "") {
                 continue;
             }
             print_error_msg("Two Columns (" . $this->colNames[$i] . ", " . $this->colNames[$key] . ") use the same alias");
             return FALSE;
         }
     }
     reset($this->colNames);
     // TODO: error ..?!?  SELECT nr, tabelle1.nr As nr FROM ....
     // produces no Error !
     for ($i = 0; $i < count($this->colAliases); ++$i) {
         if ($key = array_search($this->colAliases[$i], $this->colNames)) {
             if ($i == $key) {
                 continue;
             }
             if ($this->colAliases[$i] == "") {
                 continue;
             }
             print_error_msg("Alias is the name from another column (" . $this->colAliases[$i] . ")");
             return FALSE;
         }
     }
     return TRUE;
 }
开发者ID:yunsite,项目名称:mapleleaf,代码行数:54,代码来源:sql.php


示例7: txtdbapi_error_handler

function txtdbapi_error_handler($errno, $errstr, $errfile, $errline)
{
    $prefix = "PHP Error: ";
    switch ($errno) {
        case E_USER_ERROR:
            print_error_msg($prefix . "FATAL [{$errno}] {$errstr} [Line: " . $errline . "] [File: " . $errfile . "]");
            break;
        default:
            print_error_msg($prefix . "[{$errno}] {$errstr} [Line: " . $errline . "] [File: " . $errfile . "]");
            break;
    }
}
开发者ID:yunsite,项目名称:mapleleaf,代码行数:12,代码来源:util.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP print_error_permission函数代码示例发布时间:2022-05-15
下一篇:
PHP print_error_box函数代码示例发布时间: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