PHP Developer''''s Dictionary- P63 potx

5 209 0
PHP Developer''''s Dictionary- P63 potx

Đang tải... (xem toàn văn)

Thông tin tài liệu

PHP Developer’s Dictionary IT-SC book 310 $hw_modifyobject($connect, $objid, $removearray, $addarray); hw_new_document() Syntax int hw_new_document (string object record , string document data, int document size, int document size) Description The hw_new_document() function, which was added in PHP 3.0.3 and PHP 4.0, creates a new Hyperwave document whose data and object record are set to document_data and object_record , respectively. The length of the document_data has to be specified in the document_size parameter. This functions only creates the document, and does not insert it into the server. hw_objrec2array() Syntax array hw_objrec2array (string object record) Description The hw_objrec2array() function, which was added in PHP 3.0.3 and PHP 4.0, generates an object array based on the object_record parameter. The attribute names of the object_record are stored as the keys in the array. Multiple similar attributes are placed into a subarray. Currently, only the Title , Description , Group , and Keyword attributes are handled properly. hw_outputdocument() Syntax int hw_outputdocument (int hw document) Description PHP Developer’s Dictionary IT-SC book 311 The hw_outputdocument() function, which was added in PHP 3.0.3 and PHP 4.0b1, outputs the document specified by the hw_document parameter excluding the BODY tag. hw_pconnect() Syntax int hw_pconnect (string host, int port, string username, string password) Description The hw_pconnect() function, which was added in PHP 3.0.3 and PHP 4.0, attempts to make a persistent connection to the specified server using the username and password parameters for authentication. The return value is the connection index if successful, and FALSE otherwise. You can attempt anonymous access by not specifying a username or password . Also note that multiple connections can exist at one time. hw_pipedocument() Syntax int hw_pipedocument (int connection, int objectID) Description The hw_pipedocument() function, which was added in PHP 3.0.3 and PHP 4.0, returns the Hyperwave document (including anchors) indicated by the objectID parameter. The contents will be returned on a special data connection that does not block the control connection. hw_root() Syntax int hw_root() Description PHP Developer’s Dictionary IT-SC book 312 The hw_root() function, which was added in PHP 3.0.3 and PHP 4.0, currently always returns 0 , which represents the object ID of the hyperroot collection. The root collection of the connected server is the child collection of the hyperroot. hw_unlock() Syntax int hw_unlock (int connection, int objectID) Description The hw_unlock() function, which was added in PHP 3.0.3 and PHP 4.0, releases a lock on the object specified by the objectID parameter so that others may gain access. hw_who() Syntax int hw_who (int connection) Description The hw_who() function, which was added in PHP 3.0.3 and PHP 4.0, returns an array listing users currently logged on to the server. Each array entry represents a user and contains the elements id , name , system , onSinceDate , onSinceTime , TotalTime , and self , where self = 1 if the entry corresponds to the user who made the hw_who() request. hw_username() Syntax string hw_getusername (int connection) Description The hw_getusername() function, which was added in PHP 3.0.3 and PHP 4.0, returns the username corresponding to the current connection . PHP Developer’s Dictionary IT-SC book 313 PDF The PDF library functions enable you to generate PDF documents dynamically from your PHP code. The PDF library is available from http://www.pdflib.com . It is not freeware, so you should consult the licensing agreement before implementing it in your code. To understand the mapping from PHP to the PDF library, you should examine the pdf.c file typically found in the /php-4.x/ext/pdf/ directory. Note that the PDF library is not currently available as part of the Windows distribution. To include the PDF library, use the following in your configure arguments: with-pdflib=<directory above /lib/pdflib.so> with-zlib-dir=<directory above /lib/libz.so with-jpeg-dir=<directory above /lib/libjpeg.so> with-png-dir=<directory above /lib/libpng.so with-tiff-dir=<directory above /lib/libtiff.so> The PDF library requires the JPEG, PNG, Tiff, and Zlib libraries as indicated by running configure help. An alternative to the PDF library is the ClibPDF library documented earlier in this chapter. There are licensing differences between the two libraries as well as some feature differences. You should consult the documentation that comes with the PDF and ClibPDF libraries for more details. pdf_get_info() Syntax info pdf_get_info (string filename) Description The pdf_get_info() function, which was added in PHP 3.0.6 and PHP 4.0b1, returns an empty info structure for a PDF document. The info structure can be filled with document details such as subject, author, and so on. pdf_set_info() Syntax info pdf_set_info (int pdf_document, string fieldname, string value) Description The pdf_set_info() function, which was added in PHP 4.0.1, is used to set the information fields of a PDF document. Possible fieldname parameter values include PHP Developer’s Dictionary IT-SC book 314 Subject , Title , Creator , Author , Keywords , and one user-defined name. This function must be called before pdf_begin_page() . pdf_open() Syntax int pdf_open (int file) Description The pdf_open() function, which was added in PHP 3.0.6 and PHP 4.0, opens a new PDF document. The corresponding file has to be opened with fopen() and the resulting file descriptor passed as the file parameter. The return value is used as an argument to subsequent PDF functions that access the document. pdf_close() Syntax void pdf_close (int pdf document) Description The pdf_close() function, which was added in PHP 3.0.6 and PHP 4.0, closes the specified pdf_document . pdf_begin_page() Syntax void pdf_begin_page (int pdf document, double width, double height) Description The pdf_begin_page() function, which was added in PHP 3.0.6 and PHP 4.0, creates a new page with the dimensions width and height . This function must be called at the beginning of every PDF page. pdf_end_page() . hw_outputdocument (int hw document) Description PHP Developer’s Dictionary IT-SC book 311 The hw_outputdocument() function, which was added in PHP 3.0.3 and PHP 4.0b1, outputs the document specified. hw_root() Syntax int hw_root() Description PHP Developer’s Dictionary IT-SC book 312 The hw_root() function, which was added in PHP 3.0.3 and PHP 4.0, currently always returns 0 , which. The hw_getusername() function, which was added in PHP 3.0.3 and PHP 4.0, returns the username corresponding to the current connection . PHP Developer’s Dictionary IT-SC book 313 PDF The

Ngày đăng: 07/07/2014, 05:20

Mục lục

    PHP Developer's Dictionary

    Tell Us What You Think!

    Who Should Buy This Book?

    Organization of the Chapters

    Chapter 1. Basic PHP Background and History

    PHP Installation General Overview

    Types, Variables, and Constants

    Operators and Mathematical Functions

    Functions, Classes, and Objects

    Using Request Variables to Generate Content

Tài liệu cùng người dùng

  • Đang cập nhật ...