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


PHP Driver::Run方法代码示例

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


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

示例1: CanvasGraph

        $this->iFromColor = $aFrom;
        $this->iToColor = $aTo;
        $this->iStyle = $aStyle;
        $this->graph = new CanvasGraph($aWidth, $aHeight);
        $this->grad = new Gradient($this->graph->img);
        $this->grad->FilledRectangle(0, 0, $this->iWidth, $this->iHeight, $this->iFromColor, $this->iToColor, $this->iStyle);
        if ($aFileName != "") {
            $this->graph->Stroke($aFileName);
            echo "Image file '{$aFileName}' created.";
        } else {
            $this->graph->Stroke();
        }
    }
    function Run()
    {
        global $HTTP_POST_VARS;
        // Two modes:
        // 1) If the script is called with no posted arguments
        // we show the input form.
        // 2) If we have posted arguments we naivly assume that
        // we are called to do the image.
        if (@$_POST['ok'] === ' Ok ') {
            $this->GenGradImage();
        } else {
            $this->iForm->Run();
        }
    }
}
$driver = new Driver();
$driver->Run();
开发者ID:hcvcastro,项目名称:pxp,代码行数:30,代码来源:mkgrad.php

示例2: ParseArgs

                $e = BackendFactory::Create(BACKEND_PS, $encoder);
                set_exception_handler(array('Driver', 'ErrHandlerPS'));
                break;
            case 2:
                $e = BackendFactory::Create(BACKEND_PS, $encoder);
                $e->SetEPS();
                set_exception_handler(array('Driver', 'ErrHandlerPS'));
                break;
        }
        $e->SetHeight($aParams['height']);
        $e->SetVertical($aParams['rotate']);
        $e->SetModuleWidth($aParams['modulewidth']);
        $e->SetScale($aParams['scale']);
        $e->HideText($aParams['hide']);
        if ($aParams['output'] === 0) {
            $err = $e->Stroke($aParams['data'], $aParams['filename']);
        } else {
            $s = $e->Stroke($aParams['data'], $aParams['filename']);
            if ($aParams['filename'] == '') {
                // If no filename specified then return the generated postscript
                echo $s;
            }
        }
    }
}
$pa = new ParseArgs();
$params = $pa->Get();
$driver = new Driver();
$driver->Run($params);
// Successfull termination
exit(0);
开发者ID:hcvcastro,项目名称:pxp,代码行数:31,代码来源:mkbarcode.php

示例3: strtok

        global $HTTP_COOKIE_VARS;
        $this->iDB = DBFactory::InitDB();
        $this->iProjname = strtok(@$HTTP_COOKIE_VARS['ddda_project'], ':');
        if ($this->iProjname != '') {
            $this->iProjidx = strtok(':');
        } else {
            die('No project specified.');
        }
    }
    function Run($aClass, $aFlags = 0)
    {
        $dbremove = new RemoveDBClass($this->iDB);
        if ($dbremove->Run($this->iProjname, $aClass, $aFlags)) {
            echo "Class <b>{$aClass}</b> has been removed from JpGraph Database.";
        } else {
            Utils::Error("Can't remove class <b>{$aClass}</b> from JpGRaph Database.");
        }
    }
}
//==========================================================================
// Script entry point
// Read URL argument and create Driver
//==========================================================================
if (!isset($HTTP_GET_VARS['class'])) {
    Utils::Error("Must specify class to remove from db. Use syntax class=<class-name>");
} else {
    $class = urldecode($HTTP_GET_VARS['class']);
}
$driver = new Driver();
$driver->Run($class);
开发者ID:wahgithub,项目名称:chits_wah_emr,代码行数:30,代码来源:jpdbdelclass.php


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