Index: phpdoc/nl/functions/mcrypt.xml diff -u phpdoc/nl/functions/mcrypt.xml:1.2 phpdoc/nl/functions/mcrypt.xml:1.3 --- phpdoc/nl/functions/mcrypt.xml:1.2 Wed Oct 18 15:13:07 2000 +++ phpdoc/nl/functions/mcrypt.xml Sun Nov 12 15:03:58 2000 @@ -876,7 +876,7 @@ $modes = mcrypt_list_modes (); foreach ($modes as $mode) { - echo $mode."/n"; + echo "$mode </br>"; } ?> Index: phpdoc/nl/functions/outcontrol.xml diff -u phpdoc/nl/functions/outcontrol.xml:1.1 phpdoc/nl/functions/outcontrol.xml:1.2 --- phpdoc/nl/functions/outcontrol.xml:1.1 Tue Oct 10 15:07:53 2000 +++ phpdoc/nl/functions/outcontrol.xml Sun Nov 12 15:03:58 2000 @@ -62,6 +62,25 @@ using (CGI, a web server, etc.) This effectively tries to push all the output so far to the user's browser. + + + flush has no effect on the buffering + scheme of your webserver or the browser on the client + side. + + + Several servers, especially on Win32, will still buffer + the output from your script until it terminates before + transmitting the results to the browser. + + + Even the browser may buffer its input before displaying it. + Netscape, for example, buffers text until it receives an + end-of-line or the beginning of a tag, and it won't render + tables until the </table> tag of the outermost table is + seen. + + @@ -75,7 +94,11 @@ void ob_start - + string + + output_callback + + @@ -91,6 +114,48 @@ ob_end_clean will silently discard the buffer contents. + + An optional output_callback function may be specified. This + function takes a string as a parameter and returns a string. + The function will be called at ob_end_flush + time and will receive the contents of the output buffer as its + parameter. It must return a new output buffer as a result, + which is what will be printed. + + + Output buffers are stackable, that is, you may call + ob_start while another + ob_start is active. Just make + sure that you call ob_end_flush() + the appropriate number of times. If multiple output callback + functions are active, output is being filtered sequentially + through each of them in nesting order. + + + Callback function example + +<?php +function c($str) { + // Druu Chunusun mut dum Kuntrubuß... + return nl2br(ereg_replace("[aeiou]", "u", $str)); +} + +function d($str) { + return strip_tags($str); +} +?> + +<?php ob_start("c"); ?> +Drei Chinesen mit dem Kontrabaß... +<?php ob_start("d"); ?> +<h1>..saßen auf der Straße und erzählten sich was...</h1> +<?php ob_end_flush(); ?> +... da kam die Polizei, ja was ist denn das? +<?php ob_end_flush(); ?> + +?> + + See also ob_get_contents, ob_end_flush, Index: phpdoc/nl/functions/recode.xml diff -u phpdoc/nl/functions/recode.xml:1.1 phpdoc/nl/functions/recode.xml:1.2 --- phpdoc/nl/functions/recode.xml:1.1 Tue Oct 10 15:07:53 2000 +++ phpdoc/nl/functions/recode.xml Sun Nov 12 15:03:58 2000 @@ -36,13 +36,19 @@ Recode the string string according to - the recode request request. Returns - FALSE, if unable to comply, TRUE otherwise. + the recode request request. Returns the + recoded string or FALSE, if unable to perform the recode request. A simple recode request may be "lat1..iso646-de". See also the GNU Recode documentation of your installation for detailed instructions about recode requests. + + Basic <function>recode_string</function> example: + +print recode_string ("us..flat", "The following character has a diacritical mark: &aacute;"); + + @@ -81,21 +87,32 @@ Description - bool recode_file - int input - int output + boolean recode_file + string request + resource input + resource output Recode the file referenced by file handle input into the file referenced by file handle output according to the recode - request. Returns FALSE, if unable to comply, TRUE - otherwise. + request. Returns FALSE, if unable to + comply, TRUE otherwise. This function does not currently process filehandles referencing remote files (URLs). Both filehandles must refer to local files. + + + + Basic <function>recode_file</function> example + +$input = fopen ('input.txt', 'r'); +$output = fopen ('output.txt', 'w'); +recode_file ("us..flat", $input, $output); + + Index: phpdoc/nl/functions/strings.xml diff -u phpdoc/nl/functions/strings.xml:1.1 phpdoc/nl/functions/strings.xml:1.2 --- phpdoc/nl/functions/strings.xml:1.1 Tue Oct 10 15:07:53 2000 +++ phpdoc/nl/functions/strings.xml Sun Nov 12 15:03:58 2000 @@ -2425,6 +2425,28 @@ If needle is not found, returns false. + + + It is easy to mistake the return values for "character found at + position 0" and "character not found". Here's how to detect + the difference: + + +// in PHP 4.0b3 and newer: +$pos = strrpos ($mystring, "b"); +if ($pos === false) { // note: three equal signs + // not found... +} + +// in versions older than 4.0b3: +$pos = strrpos ($mystring, "b"); +if (is_string ($pos) && !$pos) { + // not found... +} + + + + If needle is not a string, it is converted @@ -3050,6 +3072,14 @@ // Lamb And She Loved It So. + + + The definition of a word is any string of characters + that is immediately after a whitespace (These are: + space, form-feed, newline, carriage return, horizontal tab, + and vertical tab). + + See also strtoupper, Index: phpdoc/nl/functions/xslt.xml +++ phpdoc/nl/functions/xslt.xml XSLT functions XSLT Introduction About XSLT and Sablotron XSLT (Extensible Stylesheet Language (XSL) Transformations) is a language for transforming XML documents into other XML documents. It is a standard defined by The World Wide Web consortium (W3C). Information about XSLT and related technologies can be found at &url.xslt;. Installation This extension uses Sabloton and expat, which can both be found at &url.sablotron;. Binaries are provided as well as source. On UNIX, run configure with the and options. The Sablotron library should be installed somewhere your compiler can find it. About This Extension This PHP extension implements support Sablotron from Ginger Alliance in PHP. This toolkit lets you transform XML documents into other documents, including new XML documents, but also into HTML or other target formats. It basically provides a standardized and portable template mechanism, separating content and design of a website. xslt_closelog Clear the logfile for a given instance of Sablotron Description bool xslt_closelog resource xh xh A reference to the XSLT parser. This function returns false if parser does not refer to a valid parser, or if the closing of the logfile fails. Otherwise it returns true. xslt_create Create a new XSL processor. Description resource xslt_create This function returns a handle for a new XSL processor. This handle is needed in all subsequent calls to XSL functions. xslt_errno Return the current error number Description int xslt_errno int xh Return the current error number of the given XSL processor. If no handle is given, the last error number that occured anywhere is returned. xslt_error Return the current error string Description mixed xslt_error int xh Return the current error string of the given XSL processor. If no handle is given, the last error string that occured anywhere is returned. xslt_fetch_result Fetch a (named) result buffer Description string xslt_fetch_result int xh string result_name Fetch a result buffer from the XSLT processor identified by the given handle. If no result name is given, the buffer named "/_result" is fetched. xslt_free Free XSLT processor Description void xslt_free resource xh Free the XSLT processor identified by the given handle. xslt_openlog Set a logfile for XSLT processor messages Description bool xslt_openlog resource xh string logfile int loglevel Set a logfile for the XSLT processor to place all of its error messages. xslt_output_begintransform unknown Description unknown xslt_output_begintransform unknown This function lacks a prototype definition. xslt_output_endtransform unknown Description unknown xslt_output_endtransform unknown This function lacks a prototype definition. xslt_output_process unknown Description unknown xslt_process unknown This function lacks a prototype definition. xslt_run Apply a XSLT stylesheet to a file. Description bool xslt_run resource xh string xslt_file string xml_data_file string result array xslt_params array xslt_args Process the xml_data_file by applying the xslt_file stylesheet to it. The stylesheet has access to xslt_params and the processor is started with xslt_args. The result of the XSLT transformation is placed in the named buffer (default is "/_result"). xslt_set_sax_handler Set SAX handlers for a XSLT processor Description bool xslt_set_sax_handler resource xh array handlers Set SAX handlers on the ressource handle given by xh. xslt_transform unknown Description unknown xslt_transform unknown This function lacks a prototype definition.