cvs: phpdoc-zh /faq com.xml using.xml

From: Date: Sun, 12 Jan 2003 10:48:55 +0000
Subject: cvs: phpdoc-zh /faq com.xml using.xml
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-972@lists.php.net to get a copy of this message
dallas Sun Jan 12 05:48:55 2003 EDT Modified files: /phpdoc-zh/faq com.xml using.xml Log: Update with EN ver. Index: phpdoc-zh/faq/com.xml diff -u phpdoc-zh/faq/com.xml:1.2 phpdoc-zh/faq/com.xml:1.3 --- phpdoc-zh/faq/com.xml:1.2 Wed Sep 4 16:01:01 2002 +++ phpdoc-zh/faq/com.xml Sun Jan 12 05:48:55 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision:1.9 Maintainer: dallas Status: ready --> +<!-- EN-Revision:1.10 Maintainer: dallas Status: ready --> <chapter id="faq.com"> <title>PHP ºÍ COM</title> <titleabbrev>PHP ºÍ COM</titleabbrev> @@ -194,7 +194,42 @@ </question> <answer> <para> - »¹²»ÄÜ¡£ + ´Ó PHP 4.3.0 ¿ªÊ¼£¬¿ÉÒÔ×Ô¶¨ÒåʼþÊÕ±¨·½²¢ÇÒÈçÒÔÏÂÀý×ÓËùʾ°ó¶¨Ö®¡£¿ÉÒÔÓà + <function>com_print_typeinfo</function> À´Èà PHP ²úÉúʼþÊÕ±¨·½ÀàµÄ¿ò¼Ü¡£ + <example> + <title>COM ʼþÊÕ±¨·½Àý×Ó</title> + <programlisting role="php"> +<![CDATA[ +<?php +class IEEventSinker { + var $terminated = false; + + function ProgressChange($progress, $progressmax) { + echo "Download progress: $progress / $progressmax\n"; + } + + function DocumentComplete(&$dom, $url) { + echo "Document $url complete\n"; + } + + function OnQuit() { + echo "Quit!\n"; + $this->terminated = true; + } +} +$ie = new COM("InternetExplorer.Application"); +$sink =& new IEEventSinker(); +com_event_sink($ie, $sink, "DWebBrowserEvents2"); +$ie->Visible = true; +$ie->Navigate("http://www.php.net"); +while(!$sink->terminated) { + com_message_pump(4000); +} +$ie = null; +?> +]]> + </programlisting> + </example> </para> </answer> </qandaentry> Index: phpdoc-zh/faq/using.xml diff -u phpdoc-zh/faq/using.xml:1.3 phpdoc-zh/faq/using.xml:1.4 --- phpdoc-zh/faq/using.xml:1.3 Wed Sep 4 17:13:10 2002 +++ phpdoc-zh/faq/using.xml Sun Jan 12 05:48:55 2003 @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="gb2312"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <!-- $Author: dallas $ --> -<!-- EN-Revision:1.19 Maintainer: dallas Status: ready --> +<!-- EN-Revision:1.20 Maintainer: dallas Status: ready --> <chapter id="faq.using"> <title>ʹÓà PHP</title> <titleabbrev>ʹÓà PHP</titleabbrev> @@ -67,8 +67,8 @@ </question> <answer> <para> - ÒªÔÚÒ»¸ö±í´ïʽÖУ¨ÀýÈçÔÚÉÏÃæµÄÀý×ÓÖÐºÍÆäËü×Ö·û´®Á¬½Ó£©Ê¹Óú¯ÊýµÄ½á¹û£¬ÄãÐèÒªÓà - <emphasis>return</emphasis> ·µ»ØÕâ¸öÖµ£¬¶ø²»ÊÇ <function>echo</function> Ëü¡£ + ÒªÔÚÒ»¸ö±í´ïʽÖУ¨ÀýÈçÔÚÉÏÃæµÄÀý×ÓÖÐºÍÆäËü×Ö·û´®Á¬½Ó£©Ê¹Óú¯ÊýµÄ½á¹û£¬ÄãÐèÒª + <function>return</function> Õâ¸öÖµ£¬¶ø²»ÊÇ <function>echo</function> Ëü¡£ </para> </answer> </qandaentry> @@ -229,6 +229,14 @@ <literal>global $DOCUMENT_ROOT;</literal>£©£¬»òÕßÓÃÈ«¾Ö±äÁ¿Êý×飨ÀýÈç <literal>$GLOBALS["DOCUMENT_ROOT"]</literal>£©¡£ </para> + <note> + <para> + ´Ó PHP 4.1.0 ¿ªÊ¼Ò²¿ÉÒÔʹÓ󬼶ȫ¾ÖÊý×é + <literal>$_SERVER</literal>£¬ËüÔÚÿ¸öº¯ÊýÖж¼¿ÉÓá£ÀýÈçÄãÏÖÔÚ¿ÉÒÔÓà + <literal>$_SERVER["DOCUMENT_ROOT"]</literal> À´´úÌæ + <literal>$DOCUMENT_ROOT</literal>¡£ + </para> + </note> </answer> </qandaentry>

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