本文整理匯總了PHP中DBConnect::getPDO方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBConnect::getPDO方法的具體用法?PHP DBConnect::getPDO怎麽用?PHP DBConnect::getPDO使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBConnect
的用法示例。
在下文中一共展示了DBConnect::getPDO方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: DBConnect
<?php
include 'api/classes/Auth.php';
include 'api/classes/Request.php';
include 'api/classes/Model/Quest.php';
session_start();
session_save_path('./session');
echo $_SESSION['username'];
$db = new DBConnect();
$mysqli = $db->mysqli;
$pdo = $db->getPDO();
$auth = new Auth();
if (!$auth->is_loggedin()) {
$auth->redirect("/auth/index.php");
}
$uid = $_SESSION['user_session'];
$request = new Request($uid);
?>
<!DOCTYPE html>
<html>
<head>
<title>Questian :: Timeline</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
<meta name="theme-color" content="#00bcd9">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="//rawgit.com/Soldier-B/jquery.toast/master/jquery.toast/jquery.toast.min.css" />
<link rel="stylesheet" href="css/noto.css">