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


PHP display_errors函数代码示例

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


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

示例1: process

 public function process($slug = NULL)
 {
     if (!$slug) {
         show_404();
     }
     $form = $this->fuel->forms->get($slug);
     $return_url = $this->input->get_post('return_url') ? $this->input->get_post('return_url') : $form->get_return_url();
     $form_url = $this->input->get_post('form_url');
     if ($form and $form->process()) {
         if (is_ajax()) {
             // Set a 200 (okay) response code.
             set_status_header('200');
             echo $form->after_submit_text;
             exit;
         } else {
             $this->session->set_flashdata('success', TRUE);
             redirect($return_url);
         }
     } else {
         $this->session->set_flashdata('posted', $this->input->post());
         if (is_ajax()) {
             // Set a 500 (bad) response code.
             set_status_header('500');
             echo display_errors(NULL, '');
             exit;
         } else {
             if (!empty($form_url) && $form_url != $return_url) {
                 $return_url = $form_url;
                 // update to post back to the correct page when there's an error
             }
             $this->session->set_flashdata('error', $form->errors());
             redirect($return_url);
         }
     }
 }
开发者ID:daylightstudio,项目名称:FUEL-CMS-Forms-Module,代码行数:35,代码来源:Forms.php

示例2: assign_jobs

function assign_jobs()
{
    global $smarty;
    global $db;
    $db->run('get_jobs_customer(' . $_SESSION['customer_id'] . ')');
    if ($db->error_result) {
        display_error(1);
        return true;
    }
    $jobs = $db->get_result_array();
    if (empty($jobs)) {
        $smarty->assign('job_message', 'Im Moment sind keine Aufträge vorhanden.');
        return true;
    }
    $db->run('get_job_status_customer(' . $_SESSION['customer_id'] . ')');
    if ($db->error_result) {
        display_errors(1);
        return true;
    }
    $job_status = $db->get_result_array();
    foreach ($jobs as $j_key => $job) {
        foreach ($job_status as $js_key => $status) {
            if ($job['job_id'] == $status['job_id']) {
                $jobs[$j_key]['status'][] = $status;
            }
        }
    }
    $smarty->assign('jobs', $jobs);
    return true;
}
开发者ID:soi,项目名称:int_repair,代码行数:30,代码来源:assign_functions.php

示例3: parse_messages

function parse_messages()
{
    if (isset($_GET['success']) && $_GET['success']) {
        display_success($_GET['success'], true);
    }
    if (isset($_GET['errors']) && $_GET['errors']) {
        display_errors(explode($_GET['errors']));
    }
}
开发者ID:soi,项目名称:int_repair,代码行数:9,代码来源:index.php

示例4: test_display_errors_one

    function test_display_errors_one()
    {
        new_flash('Something went wrong', 1);

        $result = display_errors(true);

        $this->assertEquals(preg_match('/Something went wrong/', $result), 1);
        $this->assertEquals($_SESSION['flash'], array());

    }
开发者ID:robehickman,项目名称:decentralised_microblogging_system,代码行数:10,代码来源:hlpErrorsTest.php

示例5: valid_request

function valid_request($required_vars)
{
    global $smarty;
    foreach ($required_vars as $val) {
        if (!$val) {
            display_errors(2);
            return false;
        }
    }
    return true;
}
开发者ID:soi,项目名称:int_repair,代码行数:11,代码来源:display_functions.php

示例6: complete_add_email

function complete_add_email()
{
    if (valid_request(array(isset($_POST['title']), isset($_POST['email']), isset($_POST['text'])))) {
        global $smarty;
        if (!mail('fstiehler@yahoo.de', "Interface Mail: " . $_POST['title'], $_SESSION['last_name'] . ", " . $_SESSION['first_name'] . " (" . $_SESSION['customer_id'] . ") schreibt: \r\n\r\n" . $_POST['text'], "From: " . $_POST['email'] . "\r\nReply-To: " . $_POST['email'] . "")) {
            display_errors(50);
            return true;
        }
        redirect('jobs', '', 'add_email');
    }
    return true;
}
开发者ID:soi,项目名称:int_repair,代码行数:12,代码来源:complete_functions.php

示例7: display_info

function display_info($type, $info, $debug = 0)
{
    switch ($type) {
        case "1":
            if (!empty($info)) {
                $txt_to_print .= display_errors($info);
            }
            break;
        case "2":
            $txt_to_print = $debug == 1 ? sprintf("-- %'-85s\n", $info) : "";
            break;
        case "3":
            $txt_to_print = "\n" . $info;
            break;
        case "4":
            $txt_to_print = $debug == 1 ? "\n" . $info : "";
            break;
    }
    return $txt_to_print;
}
开发者ID:jhbsz,项目名称:ossimTest,代码行数:20,代码来源:mysqldiff.php

示例8: call_and_assign

function call_and_assign($sql, $var_name, $array = false, $alert_when_empty = false)
{
    global $smarty;
    global $db;
    //echo $sql."<br />";
    $db->run($sql);
    if ($db->error_result) {
        display_errors(1);
        return true;
    }
    if ($alert_when_empty && $db->empty_result) {
        display_errors(3);
        return true;
    }
    if ($array) {
        $smarty->assign($var_name, $db->get_result_array());
    } else {
        $smarty->assign($var_name, $db->get_result_row());
    }
    return true;
}
开发者ID:soi,项目名称:int_repair,代码行数:21,代码来源:assign_functions.php

示例9: cadastrar_image_doct

 public function cadastrar_image_doct()
 {
     $user_name = $this->session->userdata('username');
     $dataAtualizacao = date('y-m-d h:i:s');
     $row_id = $this->input->post('row_id');
     $file_to_upload = $this->input->post('file_send');
     // 'upload_path'     => dirname($_SERVER["SCRIPT_FILENAME"])."/files/",
     //           'upload_url'      => base_url()."files/",
     $config['upload_path'] = dirname($_SERVER["SCRIPT_FILENAME"]) . "/imagens_doct";
     $config['upload_url'] = base_url() . "/imagens_doct";
     $config['allowed_types'] = 'gif|jpg|png';
     $config['max_size'] = '100000';
     $config['encrypt_name'] = true;
     $this->upload->initialize($config);
     $this->load->library('upload', $this->config);
     if ($this->upload->do_upload('file_send')) {
         echo "file upload success";
         $data_upload = $this->upload->data();
         $dataImage['ID_image'] = $this->input->post('ID_image');
         $dataImage['id_row'] = $this->input->post('row_id');
         $dataImage['title_image'] = $this->input->post('file_name');
         $dataImage['nome_image_doct'] = $data_upload['file_name'];
         //var_dump($dataAnexo);
         // die;
         $Row_File = 0;
         if ($this->input->post('ID_image') != null) {
             $dataImage['UPDATE_BY'] = $user_name;
             $dataImage['LAST_UPDATE'] = $dataAtualizacao;
             $Row_File = $this->atualizarDoct->atualiza_image($dataImage);
         } else {
             $dataImage['CREATED_BY'] = $user_name;
             $dataImage['CREATED'] = $dataAtualizacao;
             $Row_File = $this->documentoModel->cadastrar_imagem($dataImage);
             $rowOBJ = $Row_File[0];
             $param = $rowOBJ->id_image;
             //Salvar o wrs na tabela main
             $Novo_main = null;
             $row_main['ROW_ID'] = $this->input->post('row_id');
             $row_main['parent_TBL'] = 'tbl_doct';
             $row_main['parent_id'] = $this->input->post('row_id');
             $row_main['CHILD_ID'] = $param;
             $row_main['CHILD_TBL'] = 'tbl_image_doct';
             $Novo_main = $this->documentoModel->cadastrar_main($row_main);
         }
         if ($Row_File != 0) {
             redirect('/detalhes_documento/getTheRow/' . $this->input->post('row_id') . '');
         }
     } else {
         echo "file upload failed";
         redirect(base_url("/index.php/continuar_documento/Imagens_doct/" . $row_id . ""));
         echo display_errors();
     }
 }
开发者ID:FabianoFaria,项目名称:ULA_front,代码行数:53,代码来源:novo_documento.php

示例10: ossim_valid

 }
 ossim_valid($column, OSS_DIGIT, 'illegal:' . _("Widget Column"));
 ossim_valid($order, OSS_DIGIT, 'illegal:' . _("Widget Row"));
 if (ossim_error()) {
     $info_error[] = ossim_get_error();
     ossim_clean_error();
     $error = true;
 }
 if ($widget_type == 'report' && !$pro) {
     $info_error[] = _('Report section is only available in professional version');
     $error = true;
 }
 if ($error == true) {
     $step = "5";
     $class = "wr_show";
     $errors_txt = display_errors($info_error);
 } else {
     $new_widget = new Dashboard_widget();
     $new_widget->set_id($id_content);
     $new_widget->set_type_id($widget_id);
     $new_widget->set_panel_id($tab);
     $new_widget->set_user($owner);
     $new_widget->set_col($column);
     $new_widget->set_fil($order);
     $new_widget->set_height($widget_height);
     $new_widget->set_title($widget_title);
     $new_widget->set_help($widget_help);
     $new_widget->set_refresh($widget_refresh);
     $new_widget->set_file($widget_url);
     $new_widget->set_type($widget_type);
     $new_widget->set_asset($widget_asset);
开发者ID:jackpf,项目名称:ossim-arc,代码行数:31,代码来源:wizard.php

示例11: display_errors

	
</head>

<body>

<div class='c_back_button' style="display: block;">
    <input type='button' class="av_b_back" onclick="document.location.href='../incidents/index.php';return false;"/>
</div>

<?php 
/*
 * FORM FOR NEW/EDIT TAG
 */
if ($action == 'new1step' || $action == 'mod1step') {
    if ($error == TRUE) {
        echo display_errors($info_error);
    }
    $action = str_replace('1', '2', $action);
    ?>
	
	<div class="legend">
        <?php 
    echo _('Values marked with (*) are mandatory');
    ?>
    </div>	
	
	<form method="post" action="?action=<?php 
    echo $action;
    ?>
&id=<?php 
    echo Util::htmlentities($id);
开发者ID:jackpf,项目名称:ossim-arc,代码行数:30,代码来源:incidenttag.php

示例12: handle_document_generation

function handle_document_generation($cart_order_id, $invoice, $url, $document_type)
{
    $connection_parameters = get_api_connection_parameters("./config.ini");
    $nazwaUsera = $connection_parameters['API_LOGIN'];
    //login do ifirma
    $klucz_hex = $connection_parameters['API_KEY_FAKTURA'];
    //klucz wygenerowany w ifirmie
    //$typ_faktury = 'orygkopia'; //typ faktury w pdfie: np.dup, kopia, oryg, orygkopia
    $nazwaKlucza = "faktura";
    $typ_pliku = "json";
    //rodzaj pliku, ktory wysylamy
    $typ_pobierz = "pdf";
    //oczekiwana odpowiedz
    $url_get = "https://www.ifirma.pl/iapi/fakturakraj/";
    $klucz = hexToStr($klucz_hex);
    $exception = false;
    $bledy = array();
    $content = $invoice->toJson();
    $curlWysylanieHandle = curl_init($url);
    $faktura_do_poprawki = false;
    ustaw_odpowiedni_miesiac_ksiegowy($invoice, $connection_parameters);
    $rsp = wyslij_jedna($typ_pliku, $content, $klucz, $url, $nazwaUsera, $nazwaKlucza, $curlWysylanieHandle);
    $tab = json_decode($rsp, true);
    if (is_response_status_ok($tab['response']['Kod'])) {
        $url_pliku = '';
        $invoice_number = $tab['response']['Identyfikator'];
        if (isset($typ_faktury)) {
            $url_pliku = $url_get . $invoice_number . '.' . $typ_pobierz . '.' . $typ_faktury;
        } else {
            $url_pliku = $url_get . $invoice_number . '.' . $typ_pobierz;
        }
        $curlHandle = curl_init($url_pliku);
        curl_close($curlHandle);
        unset($curlHandle);
        add_info_about_generated_document($document_type, $cart_order_id, $invoice_number, get_class($invoice));
        //-------
        $generated_invoice_array = handle_invoice_download($cart_order_id, "json");
        $invdetails = $invoice->getZaplacono();
        $invpozycje = $invoice->getPozycje();
        if ($generated_invoice_array['response']['Zaplacono'] != $invdetails) {
            $faktura_do_poprawki = true;
        }
        $l = 0;
        foreach ($generated_invoice_array['response']['Pozycje'] as $pozycja) {
            $vatDwa = (double) $invpozycje[$l]['StawkaVat'];
            //->getStawkaVat();
            $cenaDwa = (double) $invpozycje[$l]['CenaJednostkowa'];
            //->getCenaJednostkowa();
            $vatRaz = (double) $pozycja['StawkaVat'];
            $cenaRaz = (double) $pozycja['CenaJednostkowa'];
            ++$l;
            if ($vatRaz != $vatDwa || $cenaRaz != $cenaDwa) {
                $faktura_do_poprawki = true;
            }
        }
        if ($faktura_do_poprawki == true) {
            add_info_about_invoice_fault($cart_order_id);
            echo "Wykryto drobne nieprawidlowosci.<br/> Możliwa przyczyna: -różnica w sposobie zaokrąglania kwoty podatku.<br />";
            echo "Proszę dokonać weryfikacji poprawności wystawionej faktury z poziomu serwisu www.ifirma.pl";
        }
        //-----------
    } else {
        $bledy = przechwyc_bledy($content, $tab, $bledy);
    }
    curl_close($curlWysylanieHandle);
    unset($curlWysylanieHandle);
    if (count($bledy) > 0) {
        display_errors($bledy);
    } else {
        redirect_to_order_page($cart_order_id);
    }
}
开发者ID:s-neilo,项目名称:ifirma-api-sklepy,代码行数:72,代码来源:ifirma_functions.php

示例13: t

    }
    ?>
                    <?php 
}
?>
                    <a href="status"><?php 
echo t('Backend Status');
?>
</a>
<?php 
if (Modules::getModule('backend_log')) {
    ?>
                    &nbsp; | &nbsp;
                    <a href="backend_log"><?php 
    echo t('Backend Logs');
    ?>
</a>
<?php 
}
?>
                </div></td>
        </tr>
        </table></td>

</tr>
</table>

<?php 
// Errors go here
display_errors();
flush();
开发者ID:antonyraj15411,项目名称:mythweb,代码行数:31,代码来源:header.php

示例14: complete_upload_match_media

/**
 * Checks a registration request for invalid inputs
 *
 * @access public
 * @return true
 */
function complete_upload_match_media()
{
    if (valid_request(array(isset($_GET['match_id']), isset($_FILES['match_media']), isset($_POST['description'])))) {
        require CLASS_PATH . 'class.upload.php';
        global $db;
        global $smarty;
        if (strlen($_POST['description']) < 2 || strlen($_POST['description']) > 20) {
            display_errors(751);
            return true;
        }
        $upload = new Upload($_FILES['match_media']);
        if ($upload->uploaded) {
            //getting the internal file name out of the current time
            $name = microtime();
            $name = substr($name, 2, 8) . substr($name, 11);
            $upload->file_new_name_body = $name;
            $upload->allowed = array('application/zip', 'image/*');
            $upload->process(MATCH_MEDIA_PATH);
            if ($upload->processed) {
                $sql = "add_match_media(" . $_GET['match_id'] . ",\n                                            " . $_SESSION['user_id'] . ",\n                                            '" . $_POST['description'] . "',\n                                            '" . $upload->file_dst_name . "', \n                                            " . filesize($upload->file_dst_pathname) . ")";
                $db->run($sql);
                if ($db->error_result) {
                    display_errors(750);
                } else {
                    display_success("upload_match_media");
                    $smarty->assign('content', $smarty->fetch("succes.tpl"));
                }
            } else {
                display_errors(750);
            }
            $upload->clean();
        } else {
            display_errors(750);
            return true;
        }
    }
    return true;
}
开发者ID:soi,项目名称:paul,代码行数:44,代码来源:complete_functions.php

示例15: redirect_to

if (!$result) {
    redirect_to("index.php");
}
?>
<div class="row transperent-background">
	<div class="col-md-4">
		<br />
		<img src="<?php 
echo $row["Picture"];
?>
" class="img-thumbnail img-responsive">
		<br />
		<br />
		<?php 
if (isset($_GET['error'])) {
    display_errors($_GET['error']);
}
?>
		<form action="upload.php?email=<?php 
echo $row["Email"];
?>
" method="post" enctype="multipart/form-data">
			<p>
				<input id="input-1a" name="picture" type="file" class="file" data-show-preview="true">
			</p>
		</form>
	</div>
	<div class="col-md-8">
		<br />

		<div class="panel panel-success">
开发者ID:thezawad,项目名称:amaderschool,代码行数:31,代码来源:profile.php


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