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


PHP Errors::isOccured方法代码示例

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


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

示例1: Errors

 $errors = new Errors();
 //Was the datafile fetched successfully
 if ($res === -2) {
     //Temporarely instance for error handling
     //'da' is danish, currently the only user interface language.
     $siteContext = new ShortSiteContext($stier, $ind, 'da');
     $errors->addError(new Error(2, sprintf($siteContext->getLocale('errDamagedDatasource'), $stier->getOption('name_of_service'))));
 } elseif (!$res or $res === 0) {
     //Temporarely instance for error handling
     $siteContext = new ShortSiteContext($stier, $ind, 'da');
     $errors->addError(new Error(2, sprintf($siteContext->getLocale('errDatasourceInaccessible'), $stier->getOption('name_of_service'))));
 }
 $lib = new Html($ind, $datafil);
 $lib->setStier($stier);
 //Write the stat image
 if (!$errors->isOccured()) {
     //'billed' is 'image' in danish: The image to display.
     if (!array_key_exists('billed', $ind)) {
         writeImage("stats1.gif", $stier);
     } else {
         //1-8: Normal images. trans: transparent/invisible.
         //sh: Blach/white, hs: White/blach.
         if ($ind['billed'] == "2") {
             writeImage("stats2.gif", $stier);
         } elseif ($ind['billed'] == "3") {
             writeImage("stats3.gif", $stier);
         } elseif ($ind['billed'] == "4") {
             writeImage("stats4.gif", $stier);
         } elseif ($ind['billed'] == "5") {
             writeImage("stats5.gif", $stier);
         } elseif ($ind['billed'] == "6") {
开发者ID:simonmikkelsen,项目名称:zipstat,代码行数:31,代码来源:zipstat.php

示例2: doRegister


//.........这里部分代码省略.........
        $datasource->setLine(104, "");
        $datasource->setLine(105, "");
        $datasource->setLine(106, "1::1::1");
        $datasource->setLine(107, "1::0::0::1::0::0::0");
        $datasource->setLine(108, "");
        $datasource->setLine(109, "");
        $datasource->setLine(110, time());
        $shortDate = $lib->kortdato();
        $nul[7] = $shortDate;
        $nul[8] = $shortDate;
        $nul[9] = $shortDate;
        $nul[11] = $shortDate;
        $nul[14] = $shortDate;
        $nul[15] = $shortDate;
        $nul[16] = $shortDate;
        $nul[18] = $shortDate;
        $nul[20] = $shortDate;
        $nul[22] = $shortDate;
        $nul[24] = $shortDate;
        $nul[26] = $shortDate;
        $nul[28] = $shortDate;
        $nul[29] = $shortDate;
        $nul[31] = $shortDate;
        $nul[33] = $shortDate;
        $nul[35] = $shortDate;
        $nul[37] = $shortDate;
        $nul[39] = $shortDate;
        $nul[43] = $shortDate;
        $nul[44] = $shortDate;
        $nul[46] = $shortDate;
        $nul[47] = $shortDate;
        $nul[49] = $shortDate;
        $nul[54] = $shortDate;
        $nul[64] = $shortDate;
        $nul[69] = $shortDate;
        $nul[73] = $shortDate;
        $nul[74] = $shortDate;
        $nul[77] = $shortDate;
        $nul[80] = $shortDate;
        $nul[112] = $shortDate;
        $nul[114] = $shortDate;
        $datasource->setLine(51, implode("::", $nul));
        if (!$errors->isOccured()) {
            $datasource->createUser();
            $datasource->gemFil();
        } else {
            $this->displayErrors($errors);
        }
        if (Html::okmail($in['e-mail'])) {
            $this->doSendEmail($simpelt_avan);
        }
        ?>
<div class=forside>
<h1><?php 
        echo $this->siteContext->getLocale('regYouAreRegistered');
        ?>
</h1>
	<P><?php 
        echo $this->siteContext->getLocale('regCongRegistered');
        ?>
</p>

<h2><?php 
        echo $this->siteContext->getLocale('regNowOnlyMissing');
        ?>
</h2>
	<p><?php 
        echo $this->siteContext->getLocale('regGenCode1');
        ?>
	<a href="userarea.php?username=<?php 
        echo htmlentities(urlencode($in['brugernavn']));
        ?>
&amp;password=<?php 
        echo htmlentities(urlencode($in['kodeord']));
        ?>
&amp;start=Obligatorisk+kode&amp;start_type=kodegen">
	<?php 
        echo $this->siteContext->getLocale('regGenCode2');
        ?>
</a>.
	<?php 
        echo $this->siteContext->getLocale('regGenCode3');
        ?>
</p>

	<p><?php 
        echo sprintf($this->siteContext->getLocale('regGenCodeAgain'), "<a href=\"" . $this->siteContext->getOption('ZSHomePage') . "\">" . $this->siteContext->getOption('ZSHomePage') . "</a>");
        ?>
</P>

<h2><?php 
        echo $this->siteContext->getLocale('regAboutHelp');
        ?>
</h2>
	<p><?php 
        echo sprintf($this->siteContext->getLocale('regAboutHelpText'), "<a href=\"" . $this->siteContext->getLocale('regUrlHelp') . "\">" . $this->siteContext->getLocale('regAboutHelp') . "</a>");
        ?>
</p></div>
<?php 
    }
开发者ID:simonmikkelsen,项目名称:zipstat,代码行数:101,代码来源:register.php


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