本文整理匯總了PHP中DBConnector::exec方法的典型用法代碼示例。如果您正苦於以下問題:PHP DBConnector::exec方法的具體用法?PHP DBConnector::exec怎麽用?PHP DBConnector::exec使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DBConnector
的用法示例。
在下文中一共展示了DBConnector::exec方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: dirname
<?php
/*
Copyright (C) 2014 Universitätsbibliothek Mannheim
See file LICENSE for license details.
Author: Stefan Weil, Universitätsbibliothek Mannheim
*/
$servername = $_SERVER["SERVER_NAME"];
$serveraddress = $_SERVER["SERVER_ADDR"];
$serveruri = dirname(dirname(dirname(dirname($_SERVER["REQUEST_URI"]))));
$pin = sprintf("%04u", rand(0, 9999));
$url = "http://{$servername}{$serveruri}";
// Store PIN in database.
require_once '../../../DBConnector.class.php';
$dbcon = new DBConnector();
$dbcon->exec("UPDATE setting SET value='{$pin}' WHERE key='pin'");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>PalMA – Screen Saver</title>
<script type="text/javascript" src="/javascript/jquery/jquery.js"></script>
<style type="text/css">
* {
margin: 0;
padding: 0;
}