Various fixes, including

- adding note to file uploads about more secure methods
 - uppercase all refurposes first letter
 - stripped very long refpursposes
 - removed . from end of refpurposes
 - added some more explanatory example titles
 - fixed some example PHP and HTML errors
 - a very small number of WS fixes may be inside two


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@75815 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Gabor Hojtsy 2002-03-29 18:32:48 +00:00
parent be29d66d4e
commit ee4c6577d6

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.44 $ -->
<!-- $Revision: 1.45 $ -->
<reference id="ref.oci8">
<title>Oracle 8 functions</title>
<titleabbrev>OCI8</titleabbrev>
@ -692,7 +692,7 @@ print "</PRE></HTML>";
<refnamediv>
<refname>OCINewDescriptor</refname>
<refpurpose>
Initialize a new empty descriptor LOB/FILE (LOB is default)
Initialize a new empty LOB or FILE descriptor
</refpurpose>
</refnamediv>
<refsect1>
@ -703,8 +703,8 @@ print "</PRE></HTML>";
<methodparam choice="opt"><type>int</type><parameter>type</parameter></methodparam>
</methodsynopsis>
<para>
<function>OCINewDescriptor</function> Allocates storage to hold
descriptors or LOB locators. Valid values for the valid
<function>OCINewDescriptor</function> allocates storage to hold
descriptors or LOB locators. Valid values for
<parameter>type</parameter> are OCI_D_FILE, OCI_D_LOB, OCI_D_ROWID.
For LOB descriptors, the methods load, save, and savefile are
associated with the descriptor, for BFILE only the load method
@ -748,19 +748,24 @@ print "</PRE></HTML>";
<?php
/* This script demonstrates file upload to LOB columns
* The formfield used for this example looks like this
* <form action="upload.php3" method="post" enctype="multipart/form-data">
* <form action="upload.php" method="post" enctype="multipart/form-data">
* <input type="file" name="lob_upload">
* ...
*/
if(!isset($lob_upload) || $lob_upload == 'none'){
?>
<form action="upload.php3" method="post" enctype="multipart/form-data">
<form action="upload.php" method="post" enctype="multipart/form-data">
Upload file: <input type="file" name="lob_upload"><br>
<input type="submit" value="Upload"> - <input type="reset">
</form>
<?php
} else {
// $lob_upload contains the temporary filename of the uploaded file
// see also the features section on file upload,
// if you would like to use secure uploads
$conn = OCILogon($user, $password);
$lob = OCINewDescriptor($conn, OCI_D_LOB);
$stmt = OCIParse($conn,"insert into $table (id, the_blob)
@ -876,7 +881,7 @@ Upload file: <input type="file" name="lob_upload"><br>
</methodsynopsis>
<para>
<function>OCINumCols</function> returns the number of columns in a
statement
statement.
</para>
<example>
<title>OCINumCols</title>
@ -997,7 +1002,7 @@ Upload file: <input type="file" name="lob_upload"><br>
<refentry id="function.ocifetchstatement">
<refnamediv>
<refname>OCIFetchStatement</refname>
<refpurpose>Fetch all rows of result data into an array.</refpurpose>
<refpurpose>Fetch all rows of result data into an array</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1061,7 +1066,7 @@ OCILogoff($conn);
<refentry id="function.ocicolumnisnull">
<refnamediv>
<refname>OCIColumnIsNULL</refname>
<refpurpose>test whether a result column is &null;</refpurpose>
<refpurpose>Test whether a result column is &null;</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1083,7 +1088,7 @@ OCILogoff($conn);
<refentry id="function.ocicolumnname">
<refnamediv>
<refname>OCIColumnName</refname>
<refpurpose>Returns the name of a column.</refpurpose>
<refpurpose>Returns the name of a column</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1123,6 +1128,7 @@ OCILogoff($conn);
print "<TD>$column_size</TD>";
print "</TR>";
}
print "</TABLE>\n";
OCIFreeStatement($stmt);
OCILogoff($conn);
print "</PRE>";
@ -1143,7 +1149,7 @@ OCILogoff($conn);
<refentry id="function.ocicolumnsize">
<refnamediv>
<refname>OCIColumnSize</refname>
<refpurpose>return result column size</refpurpose>
<refpurpose>Return result column size</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1206,7 +1212,7 @@ OCILogoff($conn);
<refentry id="function.ocicolumntype">
<refnamediv>
<refname>OCIColumnType</refname>
<refpurpose>Returns the data type of a column.</refpurpose>
<refpurpose>Returns the data type of a column</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1247,6 +1253,7 @@ OCILogoff($conn);
print "<TD>$column_size</TD>";
print "</TR>";
}
print "</TABLE>\n";
OCIFreeStatement($stmt);
OCILogoff($conn);
print "</PRE>";
@ -1268,7 +1275,7 @@ OCILogoff($conn);
<refnamediv>
<refname>OCIServerVersion</refname>
<refpurpose>Return a string containing server version
information.</refpurpose>
information</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1296,7 +1303,7 @@ OCILogoff($conn);
<refentry id="function.ocistatementtype">
<refnamediv>
<refname>OCIStatementType</refname>
<refpurpose>Return the type of an OCI statement.</refpurpose>
<refpurpose>Return the type of an OCI statement</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1308,20 +1315,20 @@ OCILogoff($conn);
<function>OCIStatementType</function> returns one of the following
values:
<orderedlist>
<listitem><simpara> "SELECT"</simpara></listitem>
<listitem><simpara> "UPDATE"</simpara></listitem>
<listitem><simpara> "DELETE"</simpara></listitem>
<listitem><simpara> "INSERT"</simpara></listitem>
<listitem><simpara> "CREATE"</simpara></listitem>
<listitem><simpara> "DROP"</simpara></listitem>
<listitem><simpara> "ALTER"</simpara></listitem>
<listitem><simpara> "BEGIN"</simpara></listitem>
<listitem><simpara> "DECLARE"</simpara></listitem>
<listitem><simpara> "UNKNOWN"</simpara></listitem>
<listitem><simpara>"SELECT"</simpara></listitem>
<listitem><simpara>"UPDATE"</simpara></listitem>
<listitem><simpara>"DELETE"</simpara></listitem>
<listitem><simpara>"INSERT"</simpara></listitem>
<listitem><simpara>"CREATE"</simpara></listitem>
<listitem><simpara>"DROP"</simpara></listitem>
<listitem><simpara>"ALTER"</simpara></listitem>
<listitem><simpara>"BEGIN"</simpara></listitem>
<listitem><simpara>"DECLARE"</simpara></listitem>
<listitem><simpara>"UNKNOWN"</simpara></listitem>
</orderedlist></para>
<para>
<example>
<title>Code examples</title>
<title><function>OCIStatementType</function> examples</title>
<programlisting>
<![CDATA[
<?php
@ -1348,7 +1355,7 @@ OCILogoff($conn);
<refnamediv>
<refname>OCINewCursor</refname>
<refpurpose>
Return a new cursor (Statement-Handle) - use to bind ref-cursors.
Return a new cursor (Statement-Handle)
</refpurpose>
</refnamediv>
<refsect1>
@ -1415,8 +1422,8 @@ while (OCIFetchInto($stmt,&$data,OCI_ASSOC)) {
$deptno = $data["DEPTNO"];
print "<TD>$dname</TD>";
print "<TD>$deptno</TD>";
ociexecute($data[ "EMPCNT" ]);
while (OCIFetchInto($data[ "EMPCNT" ],&$subdata,OCI_ASSOC)) {
ociexecute($data["EMPCNT"]);
while (OCIFetchInto($data["EMPCNT"],&$subdata,OCI_ASSOC)) {
$num_emps = $subdata["NUM_EMPS"];
print "<TD>$num_emps</TD>";
}
@ -1438,7 +1445,7 @@ OCILogoff($conn);
<refnamediv>
<refname>OCIFreeStatement</refname>
<refpurpose>
Free all resources associated with a statement.
Free all resources associated with a statement
</refpurpose>
</refnamediv>
<refsect1>
@ -1458,7 +1465,7 @@ OCILogoff($conn);
<refnamediv>
<refname>OCIFreeCursor</refname>
<refpurpose>
Free all resources associated with a cursor.
Free all resources associated with a cursor
</refpurpose>
</refnamediv>
<refsect1>
@ -1477,7 +1484,7 @@ OCILogoff($conn);
<refentry id="function.ocifreedesc">
<refnamediv>
<refname>OCIFreeDesc</refname>
<refpurpose>Deletes a large object descriptor.</refpurpose>
<refpurpose>Deletes a large object descriptor</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@ -1513,11 +1520,11 @@ OCILogoff($conn);
</simpara>
</refsect1>
</refentry>
<refentry id="function.ocierror">
<refnamediv>
<refname>OCIError</refname>
<refpurpose>Return the last error of stmt|conn|global.
If no error happened returns &false;.
<refpurpose>Return the last error of stmt|conn|global
</refpurpose>
</refnamediv>
<refsect1>
@ -1543,8 +1550,7 @@ OCILogoff($conn);
<refnamediv>
<refname>OCIInternalDebug</refname>
<refpurpose>
Enables or disables internal debug output. By default it is
disabled
Enables or disables internal debug output
</refpurpose>
</refnamediv>
<refsect1>
@ -1582,7 +1588,7 @@ OCILogoff($conn);
<refentry id="function.ocisetprefetch">
<refnamediv>
<refname>OCISetPrefetch</refname>
<refpurpose>sets number of rows to be prefetched</refpurpose>
<refpurpose>Sets number of rows to be prefetched</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>