cvs: phpdoc-zh /reference/oci8 reference.xml

From: Date: Mon, 14 Oct 2002 10:09:48 +0000
Subject: cvs: phpdoc-zh /reference/oci8 reference.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-726@lists.php.net to get a copy of this message
yincheng Mon Oct 14 06:09:48 2002 EDT Added files: /phpdoc-zh/reference/oci8 reference.xml Log: ·­ÒëÍê³É Index: phpdoc-zh/reference/oci8/reference.xml +++ phpdoc-zh/reference/oci8/reference.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Author: yincheng $ --> <!-- EN-Revision: 1.7 Maintainer: yincheng Status: ready --> <!-- $Revision: 1.1 $ --> <reference id="ref.oci8"> <title>Oracle 8 º¯Êý</title> <titleabbrev>OCI8</titleabbrev> <partintro> <section id="oci8.intro"> &reftitle.intro; <para> ÕâЩº¯ÊýÔÊÐíÄã·ÃÎÊ Oracle8 ºÍ Oracle7 Êý¾Ý¿â¡£ÕâЩº¯ÊýʹÓà Oracle8 Call-Interface (OCI8)¡£ </para> <para> ¸ÃÀ©Õ¹±È <link linkend="ref.oracle">Oracle ±ê×¼º¯Êý</link>À©Õ¹¸üÁé»î¡£Ö§³ÖÏò Oracle λÖñêÖ¾·û°ó¶¨¾Ö²¿ºÍÈ«¾Ö PHP ±äÁ¿£¬È«ÃæÖ§³Ö LOB¡¢FILE ºÍ ROWID£¬ÔÊÐíÓû§Ê¹ÓÃÓû§¶¨ÒåµÄ±äÁ¿¡£ </para> </section> <section id="oci8.requirements"> &reftitle.required; <para> ʹÓÃÕâ¸öÀ©Õ¹ÐèÒª Oracle8 ¿Í»§¶Ë¿â¡£ </para> <para> ÔÚʹÓÃÕâ¸öÀ©Õ¹Ö®Ç°£¬ÇëÈ·ÈÏÄãÒѾ­Îª Oracle Óû§ºÍ web daemon Óû§ÕýÈ·ÉèÖÃÁË Oracle »·¾³±äÁ¿¡£ÏÂÃæÁгöÁËÐèÒªÉèÖõĻ·¾³±äÁ¿£º <itemizedlist> <listitem> <simpara> ORACLE_HOME </simpara> </listitem> <listitem> <simpara> ORACLE_SID </simpara> </listitem> <listitem> <simpara> LD_PRELOAD </simpara> </listitem> <listitem> <simpara> LD_LIBRARY_PATH </simpara> </listitem> <listitem> <simpara> NLS_LANG </simpara> </listitem> <listitem> <simpara> ORA_NLS33 </simpara> </listitem> </itemizedlist> </para> <para> ÔÚΪ web ·þÎñÆ÷Óû§ÉèÖû·¾³±äÁ¿Ö®ºó£¬Ä㻹ÐèÒª½« web ·þÎñÆ÷Óû§(nobody¡¢ www)¼Óµ½ oracle ×éÖС£ </para> <note> <title>Èç¹ûÄãµÄ web ·þÎñÆ÷²»Äܹ»Æô¶¯»òÕßÔÚÆô¶¯µÄʱºò±ÀÀ£</title> <para> ¼ì²é Apache ÊÇ·ñʹÓÃÁË pthread ¿â: </para> <para> <informalexample> <screen> <![CDATA[ # ldd /www/apache/bin/httpd libpthread.so.0 => /lib/libpthread.so.0 (0x4001c000) libm.so.6 => /lib/libm.so.6 (0x4002f000) libcrypt.so.1 => /lib/libcrypt.so.1 (0x4004c000) libdl.so.2 => /lib/libdl.so.2 (0x4007a000) libc.so.6 => /lib/libc.so.6 (0x4007e000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) ]]> </screen> </informalexample> </para> <para> Èç¹û libpthread ûÓÐÁгö£¬Äã±ØÐèÖØÐ°²×° Apache: </para> <para> <informalexample> <screen> <![CDATA[ # cd /usr/src/apache_1.3.xx # make clean # LIBS=-lpthread ./config.status # make # make install ]]> </screen> </informalexample> </para> <para> Çë×¢ÒâÔÚÏó UnixWare ÔÚÄÚµÄijЩ²Ù×÷ϵͳÖУ¬Ê¹ÓÃlibthread ´úÌæ libpthread¡£ÔòPHP ºÍ Apache ±ØÐëʹÓà EXTRA_LIBS=-lthread ÅäÖᣠ</para> </note> </section> <section id="oci8.installation"> &reftitle.install; <para> Äã±ØÐëʹÓà <option role="configure">--with-oci8[=DIR]</option> ±àÒë PHP£¬DIR µÄĬÈÏÖµÊÇÄãµÄ»·¾³±äÁ¿ ORACLE_HOME¡£ </para> </section> <section id="oci8.configuration"> &reftitle.runtime; &no.config; </section> <section id="oci8.resources"> &reftitle.resources; <para> </para> </section> &reference.oci8.constants; <section id="oci8.examples"> &reftitle.examples; <para> <example> <title>OCI Ìáʾ</title> <programlisting role="php"> <![CDATA[ <?php // by sergo@bacup.ru // Use option: OCI_DEFAULT for execute command to delay execution OCIExecute($stmt, OCI_DEFAULT); // for retrieve data use (after fetch): $result = OCIResult($stmt, $n); if (is_object ($result)) $result = $result->load(); // For INSERT or UPDATE statement use: $sql = "insert into table (field1, field2) values (field1 = 'value', field2 = empty_clob()) returning field2 into :field2"; OCIParse($conn, $sql); $clob = OCINewDescriptor($conn, OCI_D_LOB); OCIBindByName ($stmt, ":field2", &$clob, -1, OCI_B_CLOB); OCIExecute($stmt, OCI_DEFAULT); $clob->save ("some text"); OCICommit($conn); ?> ]]> </programlisting> </example> </para> <para> Äã¿ÉÒÔʹÓÃÓëÃüÁîÐÐÏàͬµÄ·½·¨À´·ÃÎÊ´æ´¢¹ý³Ì¡£ <example> <title>ʹÓô洢¹ý³Ì</title> <programlisting role="php"> <![CDATA[ <?php // by webmaster@remoterealty.com $sth = OCIParse ( $dbh, "begin sp_newaddress( :address_id, '$firstname', '$lastname', '$company', '$address1', '$address2', '$city', '$state', '$postalcode', '$country', :error_code );end;" ); // This calls stored procedure sp_newaddress, with :address_id being an // in/out variable and :error_code being an out variable. // Then you do the binding: OCIBindByName ( $sth, ":address_id", $addr_id, 10 ); OCIBindByName ( $sth, ":error_code", $errorcode, 10 ); OCIExecute ( $sth ); ?> ]]> </programlisting> </example> </para> </section> </partintro> &reference.oci8.functions; </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t indent-tabs-mode:nil sgml-parent-document:nil sgml-default-dtd-file:"../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->

« previous php.doc.zh (#726) next »