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


PHP DBConnection::disconnect方法代码示例

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


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

示例1: testInitCustomDBConnection

 /**
  * @covers DBConnection::DBConnection
  * @covers DBConnection::initCustomDBConnection
  * @covers DBConnection::initConn
  */
 public function testInitCustomDBConnection()
 {
     $this->setTestConfiguration(self::CONFIG_PGSQL);
     $conn = new DBConnection('sqlite', 'localhost', 'ojs', 'ojs', 'ojs', true, false, false);
     $dbConn = $conn->getDBConn();
     self::assertType('ADODB_sqlite', $dbConn);
     $conn->disconnect();
     unset($conn);
 }
开发者ID:anorton,项目名称:pkp-lib,代码行数:14,代码来源:DBConnectionTest.inc.php

示例2: close_db_connection

 public static function close_db_connection()
 {
     if (self::$db_connection != null) {
         self::$db_connection->disconnect();
     }
 }
开发者ID:AroundPBT,项目名称:PHPBoost,代码行数:6,代码来源:DBFactory.class.php

示例3: sizeof

    $N = $sent[0];
    $K = $sent[1];
    $command = '/usr/bin/python /var/www/html/toyapp/toyapp-python/toyapp.py encrypt ' . $file_name . ' ' . $N . ' ' . $K;
    echo $command;
    //echo '<br />'.$command;
    //echo '<br />';
    #$result = #exec($command);#
    $result = json_decode(exec($command, $status), true);
    $size = sizeof($result);
    //print_r($result);
    $i = 0;
    require_once '../includes/shareholdersapi.inc';
    $shareholders = get_shareholders($sent[2]);
    //print_r($shareholders);
    require_once '../includes/DB_Abstraction.inc';
    $db_con = new DBConnection();
    $db_con->connect();
    foreach ($result as $pair) {
        $uid = $shareholders[$i]['uid'];
        $db_con->insert('secrets', 'fid,uid,secret', "{$sent['2']},'{$uid}','[{$pair['0']},{$pair['1']}]'");
        $i++;
        echo "<br />Secret {$i}: <input type='text' readonly='readonly' value='[{$pair['0']},{$pair['1']}]'/>";
    }
    //print_r($result);//. ' <br />';
    $db_con->update('file', "url='\\/toyapp\\/repo\\/{$fn}.enc',status=2", "fid={$sent['2']}");
    $db_con->disconnect();
    //unlink($file_name);
}
?>
</body>
</html>
开发者ID:vishnuvp,项目名称:toyapp,代码行数:31,代码来源:file_upload.php

示例4: reconstruct

            array_push($shares, $_POST['1']);
        }
        if (!empty($_POST['2'])) {
            array_push($shares, $_POST['2']);
        }
        if (!empty($_POST['3'])) {
            array_push($shares, $_POST['3']);
        }
        //var_dump($shares);
        $reconstructed_secret = reconstruct($shares);
        $db = new DBConnection();
        $db->connect();
        $user = get_user_info();
        $secret = $db->query('secret', 'secret', "uid='{$user}'", null, null, null)[0]['secret'];
        $db->delete('secret', "uid='{$user}'");
        $db->disconnect();
        if ($secret == $reconstructed_secret) {
            echo "Secrets matching. Access granted.";
        } else {
            echo "{$secret} != {$reconstructed_secret}. Access denied";
        }
    } else {
        echo "fail";
    }
} else {
    echo "fail";
}
/* [1,8683146895150534502] [2,17361141234745553751] [3,7143385603424603993]
 * Secret 5152555555515253
 *
 */
开发者ID:vishnuvp,项目名称:MultiFactorAuthenticator,代码行数:31,代码来源:reconstruct.php

示例5: usage

                 */
                $language_pack_links_file_buffer .= "\n\t\t<li><a href=\"<?= \$language_pack_leader ?>/{$each_language_pack_dir}BabelOrionCF{$language_name_no_space}Plugin.html\">Babel Orion Cloud Foundry Language Pack Plugin</a></li>";
                $language_pack_links_file_buffer .= "\n\t\t<li><a href=\"<?= \$language_pack_leader ?>/{$each_language_pack_dir}BabelOrionEditor{$language_name_no_space}Plugin.html\">Babel Orion Editor Language Pack Plugin</a></li>";
                $language_pack_links_file_buffer .= "\n\t\t<li><a href=\"<?= \$language_pack_leader ?>/{$each_language_pack_dir}BabelOrionGit{$language_name_no_space}Plugin.html\">Babel Orion Git Language Pack Plugin</a></li>";
                $language_pack_links_file_buffer .= "\n\t\t<li><a href=\"<?= \$language_pack_leader ?>/{$each_language_pack_dir}BabelOrionHelp{$language_name_no_space}Plugin.html\">Babel Orion Help Language Pack Plugin</a></li>";
                $language_pack_links_file_buffer .= "\n\t\t<li><a href=\"<?= \$language_pack_leader ?>/{$each_language_pack_dir}BabelOrionJavaScript{$language_name_no_space}Plugin.html\">Babel Orion JavaScript Language Pack Plugin</a></li>";
                $language_pack_links_file_buffer .= "\n\t\t<li><a href=\"<?= \$language_pack_leader ?>/{$each_language_pack_dir}BabelOrionUi{$language_name_no_space}Plugin.html\">Babel Orion UI Language Pack Plugin</a></li>";
                $language_pack_links_file_buffer .= "\n\t\t<li><a href=\"<?= \$language_pack_leader ?>/{$each_language_pack_dir}BabelOrionUsers{$language_name_no_space}Plugin.html\">Babel Orion Users Language Pack Plugin</a></li>";
                $language_pack_links_file_buffer .= "\n\t\t<li><a href=\"<?= \$language_pack_leader ?>/{$each_language_pack_dir}BabelOrionWebtools{$language_name_no_space}Plugin.html\">Babel Orion Webtools Language Pack Plugin</a></li>";
            }
            /* End: foreach project  */
            echo "{$leader}Completed  language pack for: {$language_name} ({$language_iso})\n";
            $language_pack_links_file_buffer .= "\n\t</ul>";
        }
        /* End: $project_pct_complete > 0 */
    }
    fwrite($language_pack_links_file, "\n\t</p>");
    fwrite($language_pack_links_file, $language_pack_links_file_buffer);
    fwrite($language_pack_links_file, "\n\t<br />\n</body>\n</html>");
    fclose($language_pack_links_file);
    $dbh = $dbc->disconnect();
    echo "Completed  language packs for: {$train_id}\n";
}
function usage()
{
    echo "\n";
    echo "generate_orion.php -b <build_id> [-t <train_id>]\n";
    echo "  -b <build_id>: The Build ID for this build\n";
    echo "  -t <train_id>: Optional: train to build (luna, kepler)";
    echo "\n";
}
开发者ID:Tiger66639,项目名称:server-1,代码行数:31,代码来源:generate_orion.php


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