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


PHP Main::run方法代码示例

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


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

示例1: run

                    <th>QAS Geo</th>
                    <th>QAS Queue</th>
                    <th>type of errors</th>
                    <th>error name</th>
                    <th>qty</th>
                </tr>
            </thead>
            <tbody class="highlight-row"></tbody>
        </table>
    </div>
    </fieldset>
    </body>
</html>
<?php 
} else {
    echo Main::run();
}
class Main
{
    public static function run()
    {
        // DataBase Connection
        $connection = mysql_connect("localhost", "stgq6", "bluehost");
        if (!$connection) {
            die("DataBase connection failed: " . mysql_error());
        }
        // Selects data base
        $db_select = mysql_select_db("stgq6", $connection);
        if (!$db_select) {
            die("DataBase selection failed: " . mysql_error());
        }
开发者ID:rcom10002,项目名称:codeslab,代码行数:31,代码来源:full.php

示例2: ampersand

        $this->Template->request = ampersand($this->Environment->request);
        $this->Template->top = $GLOBALS['TL_LANG']['MSC']['backToTop'];
        $this->Template->modules = $this->User->navigation();
        $this->Template->home = $GLOBALS['TL_LANG']['MSC']['home'];
        $this->Template->backToTop = $GLOBALS['TL_LANG']['MSC']['backToTop'];
        $this->Template->expandNode = $GLOBALS['TL_LANG']['MSC']['expandNode'];
        $this->Template->collapseNode = $GLOBALS['TL_LANG']['MSC']['collapseNode'];
        $this->Template->loadingData = $GLOBALS['TL_LANG']['MSC']['loadingData'];
        $this->Template->coreOnlyMode = $GLOBALS['TL_LANG']['MSC']['coreOnlyMode'];
        $this->Template->isCoreOnlyMode = $GLOBALS['TL_CONFIG']['coreOnlyMode'];
        // Front end preview links
        if (CURRENT_ID != '') {
            // Pages
            if ($this->Input->get('do') == 'page') {
                $this->Template->frontendFile = '?page=' . CURRENT_ID;
            } elseif ($this->Input->get('do') == 'article') {
                $objArticle = $this->Database->prepare("SELECT id, pid, alias, inColumn FROM tl_article WHERE id=?")->limit(1)->execute(CURRENT_ID);
                if ($objArticle->numRows) {
                    $this->Template->frontendFile = '?page=' . $objArticle->pid . '&amp;article=' . ($objArticle->inColumn != 'main' ? $objArticle->inColumn . ':' : '') . ($objArticle->alias != '' && !$GLOBALS['TL_CONFIG']['disableAlias'] ? $objArticle->alias : $objArticle->id);
                }
            }
        }
        $this->Template->output();
    }
}
/**
 * Instantiate the controller
 */
$objMain = new Main();
$objMain->run();
开发者ID:jens-wetzel,项目名称:use2,代码行数:30,代码来源:main.php

示例3: params_worker

        }
    }
    public static function params_worker($opt)
    {
        if (isset($opt["worker"])) {
            Crontab::$worker = true;
        }
    }
    public static function params_tasktype($opt)
    {
        if (isset($opt["tasktype"])) {
            Crontab::$taskType = $opt["tasktype"];
        }
    }
    /**
     * 记录日志
     * @param $message
     */
    public static function log_write($message)
    {
        $now = date("H:i:s");
        if (Crontab::$daemon) {
            $destination = Crontab::$log_path . "log_" . date("Y-m-d") . ".log";
            error_log("{$now} : {$message}\r\n", 3, $destination, '');
        }
        echo "{$now} : {$message}\r\n";
    }
}
//运行
Main::run();
开发者ID:noikiy,项目名称:swoole-crontab,代码行数:30,代码来源:main.php

示例4: Spot

        $this->spots[] = new Spot(42);
        $this->spots[] = new Spot(48);
        $this->spots[] = new Scanner(300);
        $this->spots[] = new Scanner(305);
        $this->spots[] = new Scanner(310);
        $this->spots[] = new Scanner(314);
        $this->dmx->addDevice(new Spot(6));
        $this->dmx->addDevice(new Spot(12));
        $this->dmx->addDevice(new Spot(18));
        $this->dmx->addDevice(new Spot(24));
        $this->dmx->addDevice(new Spot(30));
        $this->dmx->addDevice(new Spot(36));
        $this->dmx->addDevice(new Spot(42));
        $this->dmx->addDevice(new Spot(48));
        $this->dmx->addDevice(new Scanner(300));
        $this->dmx->addDevice(new Scanner(305));
        $this->dmx->addDevice(new Scanner(310));
        $this->dmx->addDevice(new Scanner(314));
        //$prog=new ProgMorse($this->dmx,"tardis__");
        $prog = new DmxHttp\Prog\Rand($this->dmx);
        //$prog=new DmxHttp\Prog\RunLight($this->dmx);
        //$prog=new ProgCounter($this->dmx);
        //$prog=new ProgRamp($this->dmx);
        //$prog=new DmxHttp\Prog\Advanced($this->dmx);
        $prog->run();
    }
}
require __DIR__ . '/vendor/autoload.php';
$main = new Main();
$main->run();
开发者ID:TuxCoder,项目名称:dmx_http,代码行数:30,代码来源:Main.php

示例5: pushObserver

    public function pushObserver(ObserverInterface $observer)
    {
        $this->observers[] = $observer;
    }
    public function updateObservers()
    {
        array_walk($this->observers, function (ObserverInterface $observer) {
            $observer->update();
        });
    }
}
class Main
{
    use ObserverTrait;
    public function run()
    {
        new \TestComponents\Component1();
    }
}
class Observer1 implements ObserverInterface
{
    public function update()
    {
        echo '<p>' . __CLASS__ . '</p>';
    }
}
$app = new Main();
$app->pushObserver(new Observer1());
$app->updateObservers();
$app->run();
开发者ID:mauriciovander,项目名称:testpackage,代码行数:30,代码来源:index.php


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