5) { sleep(1); header("Location:" . $WebSite . "login/login_form.php"); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/load_header.php'; // 첫 화면 표시 문구 $title_message = '개발일지'; ?> <?=$title_message?> prepare($sql); $stmh->bindValue(1, $num, PDO::PARAM_STR); $stmh->execute(); $row = $stmh->fetch(PDO::FETCH_ASSOC); $item_num = $row["num"]; $item_id = $row["id"]; $item_name = $row["name"]; $item_nick = $row["nick"]; $item_subject = str_replace(" ", " ", $row["subject"]); $content = $row["content"]; $item_date = $row["regist_day"]; $item_date = substr($item_date, 0, 10); $item_hit = $row["hit"]; $is_html = $row["is_html"]; } catch (PDOException $Exception) { $pdo->rollBack(); print "오류: ".$Exception->getMessage(); } $new_hit = $item_hit + 1; try{ $pdo->beginTransaction(); $sql = "update " . $DB . "." . $tablename . " set hit=? where num=?"; // 글 조회수 증가 $stmh = $pdo->prepare($sql); $stmh->bindValue(1, $new_hit, PDO::PARAM_STR); $stmh->bindValue(2, $num, PDO::PARAM_STR); $stmh->execute(); $pdo->commit(); } catch (PDOException $Exception) { $pdo->rollBack(); print "오류: ".$Exception->getMessage(); } // 초기 프로그램은 $num사용 이후 $id로 수정중임 $id=$num; $author_id = $item_id; require_once $_SERVER['DOCUMENT_ROOT'] . '/load_GoogleDriveSecond.php'; // attached, image에 대한 정보 불러오기 // print_r($saveimagename_arr); ?>
| 조회 : |