<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >hw_GetText</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="PHP 手册" HREF="index.html"><LINK REL="UP" TITLE="Hyperwave Functions" HREF="ref.hw.html"><LINK REL="PREVIOUS" TITLE="hw_GetSrcByDestObj" HREF="function.hw-getsrcbydestobj.html"><LINK REL="NEXT" TITLE="hw_getusername" HREF="function.hw-getusername.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP 手册</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.hw-getsrcbydestobj.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.hw-getusername.html" ACCESSKEY="N" >下一页</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.hw-gettext" ></A >hw_GetText</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN77328" ></A ><P > (PHP 3 >= 3.0.3, PHP 4, PECL)</P >hw_GetText -- Retrieve text document</DIV ><DIV CLASS="refsect1" ><A NAME="AEN77331" ></A ><H2 >Description</H2 >int <B CLASS="methodname" >hw_gettext</B > ( int connection, int objectID [, mixed rootID/prefix] )<BR ></BR ><P > Returns the document with object ID <CODE CLASS="parameter" >objectID</CODE >. If the document has anchors which can be inserted, they will be inserted already. The optional parameter <CODE CLASS="parameter" >rootID/prefix</CODE > can be a string or an integer. If it is an integer it determines how links are inserted into the document. The default is 0 and will result in links that are constructed from the name of the link's destination object. This is useful for web applications. If a link points to an object with name 'internet_movie' the HTML link will be <A HREF="/internet_movie">. The actual location of the source and destination object in the document hierarchy is disregarded. You will have to set up your web browser, to rewrite that URL to for example '/my_script.php3/internet_movie'. 'my_script.php3' will have to evaluate $PATH_INFO and retrieve the document. All links will have the prefix '/my_script.php3/'. If you do not want this you can set the optional parameter <CODE CLASS="parameter" >rootID/prefix</CODE > to any prefix which is used instead. Is this case it has to be a string. </P ><P > If <CODE CLASS="parameter" >rootID/prefix</CODE > is an integer and unequal to 0 the link is constructed from all the names starting at the object with the id <CODE CLASS="parameter" >rootID/prefix</CODE > separated by a slash relative to the current object. If for example the above document 'internet_movie' is located at 'a-b-c-internet_movie' with '-' being the separator between hierarchy levels on the Hyperwave server and the source document is located at 'a-b-d-source' the resulting HTML link would be: <A HREF="../c/internet_movie">. This is useful if you want to download the whole server content onto disk and map the document hierarchy onto the file system. </P ><P > This function will only work for pure text documents. It will not open a special data connection and therefore blocks the control connection during the transfer. </P ><P > See also <A HREF="function.hw-pipedocument.html" ><B CLASS="function" >hw_pipedocument()</B ></A >, <A HREF="function.hw-free-document.html" ><B CLASS="function" >hw_free_document()</B ></A >, <A HREF="function.hw-document-bodytag.html" ><B CLASS="function" >hw_document_bodytag()</B ></A >, <A HREF="function.hw-document-size.html" ><B CLASS="function" >hw_document_size()</B ></A >, and <A HREF="function.hw-output-document.html" ><B CLASS="function" >hw_output_document()</B ></A >. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.hw-getsrcbydestobj.html" ACCESSKEY="P" >上一页</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >起始页</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.hw-getusername.html" ACCESSKEY="N" >下一页</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >hw_GetSrcByDestObj</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.hw.html" ACCESSKEY="U" >上一级</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >hw_getusername</TD ></TR ></TABLE ></DIV ></BODY ></HTML >