getbydocument.php

来自「PHP 知识管理系统(基于树结构的知识管理系统), 英文原版的PHP源码。」· PHP 代码 · 共 21 行

PHP
21
字号
<?php

require_once('../../config/dmsDefaults.php');

require_once(KT_LIB_DIR . '/documentmanagement/Document.inc');
require_once(KT_LIB_DIR . '/workflow/workflow.inc.php');
require_once(KT_LIB_DIR . '/workflow/workflowutil.inc.php');

$oDocument =& Document::get(4);

$res = KTWorkflow::getByDocument($oDocument);
if (PEAR::isError($res)) {
    print "FAILED\n";
    var_dump($res);
}
$iWorkflowId = $res->getId();
if ($iWorkflowId != 1) {
    print "FAILED\n";
    print $iWorkflowId;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?