[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] cvs: phpdoc /en/reference/apache/functions apache-note.xml apache-reset-timeout.xml getall
From: "Mehdi Achour" <didou () php ! net>
Date: 2007-12-31 0:32:08
Message-ID: cvsdidou1199061128 () cvsserver
[Download RAW message or body]
didou Mon Dec 31 00:32:08 2007 UTC
Modified files:
/phpdoc/en/reference/apache/functions apache-note.xml
apache-reset-timeout.xml
getallheaders.xml virtual.xml
Log:
Integrate Frederik Ekengren and Leon Atkinson user notes on apache_note()
Add examples and see also
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/apache/functions/apache-note.xml?r1=1.5&r2=1.6&diff_format=u
Index: phpdoc/en/reference/apache/functions/apache-note.xml
diff -u phpdoc/en/reference/apache/functions/apache-note.xml:1.5 \
phpdoc/en/reference/apache/functions/apache-note.xml:1.6
--- phpdoc/en/reference/apache/functions/apache-note.xml:1.5 Wed Jun 20 22:24:13 2007
+++ phpdoc/en/reference/apache/functions/apache-note.xml Mon Dec 31 00:32:08 2007
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
-<!-- splitted from ./en/functions/apache.xml, last change in rev 1.2 -->
+<!-- $Revision: 1.6 $ -->
<refentry xml:id="function.apache-note" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>apache_note</refname>
@@ -15,10 +14,13 @@
<methodparam choice="opt"><type>string</type><parameter>note_value</parameter></methodparam>
</methodsynopsis>
<para>
- <function>apache_note</function> is an Apache-specific function
- which gets and sets values in a request's
+ Apache-specific function which gets and sets values in a request's
<literal>notes</literal> table.
</para>
+ <para>
+ The main use for <function>apache_note</function> is to pass information
+ from one module to another within the same request.
+ </para>
</refsect1>
<refsect1 role="parameters">
@@ -56,6 +58,71 @@
If the note cannot be retrieved, &false; is returned.
</para>
</refsect1>
+
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title>Passing information between PHP and Perl</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+apache_note('name', 'Fredrik Ekengren');
+
+// Call perl script
+virtual("/perl/some_script.pl");
+
+$result = apache_note("resultdata");
+?>
+]]>
+ </programlisting>
+ <programlisting role="perl">
+<![CDATA[
+# Get Apache request object
+my $r = Apache->request()->main();
+
+# Get passed data
+my $name = $r->notes('name');
+
+# some processing
+
+# Pass result back to PHP
+$r->notes('resultdata', $result);
+]]>
+ </programlisting>
+ </example>
+ </para>
+ <para>
+ <example>
+ <title>Logging values in access.log</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+apache_note('sessionID', session_id());
+
+?>
+]]>
+ </programlisting>
+ <programlisting role="apache">
+<![CDATA[
+# "%{sessionID}n" can be used in the LogFormat directive
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>virtual</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/apache/functions/apache-reset-timeout.xml?r1=1.4&r2=1.5&diff_format=u
Index: phpdoc/en/reference/apache/functions/apache-reset-timeout.xml
diff -u phpdoc/en/reference/apache/functions/apache-reset-timeout.xml:1.4 \
phpdoc/en/reference/apache/functions/apache-reset-timeout.xml:1.5
--- phpdoc/en/reference/apache/functions/apache-reset-timeout.xml:1.4 Wed Jun 20 \
22:24:13 2007
+++ phpdoc/en/reference/apache/functions/apache-reset-timeout.xml Mon Dec 31 00:32:08 \
2007 @@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry xml:id="function.apache-reset-timeout" \
xmlns="http://docbook.org/ns/docbook"> <refnamediv>
<refname>apache_reset_timeout</refname>
@@ -35,6 +35,17 @@
&reftitle.notes;
¬e.sm.disabled;
</refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>set_time_limit</function></member>
+ <member><function>ignore_user_abort</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/apache/functions/getallheaders.xml?r1=1.11&r2=1.12&diff_format=u
Index: phpdoc/en/reference/apache/functions/getallheaders.xml
diff -u phpdoc/en/reference/apache/functions/getallheaders.xml:1.11 \
phpdoc/en/reference/apache/functions/getallheaders.xml:1.12
--- phpdoc/en/reference/apache/functions/getallheaders.xml:1.11 Wed Jun 20 22:24:13 \
2007
+++ phpdoc/en/reference/apache/functions/getallheaders.xml Mon Dec 31 00:32:08 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
<!-- splitted from ./en/functions/apache.xml, last change in rev 1.2 -->
<refentry xml:id="function.getallheaders" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -58,11 +58,31 @@
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>getallheadres</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+
+foreach (getallheaders() as $name => $value) {
+ echo "$name: $value\n";
+}
+
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+
<refsect1 role="notes">
&reftitle.notes;
¬e.apache.nsapi-module;
</refsect1>
-
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/apache/functions/virtual.xml?r1=1.15&r2=1.16&diff_format=u
Index: phpdoc/en/reference/apache/functions/virtual.xml
diff -u phpdoc/en/reference/apache/functions/virtual.xml:1.15 \
phpdoc/en/reference/apache/functions/virtual.xml:1.16
--- phpdoc/en/reference/apache/functions/virtual.xml:1.15 Wed Jun 20 22:24:13 2007
+++ phpdoc/en/reference/apache/functions/virtual.xml Mon Dec 31 00:32:08 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.15 $ -->
+<!-- $Revision: 1.16 $ -->
<!-- splitted from ./en/functions/apache.xml, last change in rev 1.20 -->
<refentry xml:id="function.virtual" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
@@ -67,7 +67,7 @@
<row>
<entry>4.0.6</entry>
<entry>
- This function may be used on PHP files. However, it is typically
+ This function may be used on PHP files. However, it is typically
better to use <function>include</function> or
<function>require</function> for PHP files.
</entry>
@@ -78,14 +78,21 @@
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ See <function>apache_note</function> for an example.
+ </para>
+ </refsect1>
+
<refsect1 role="notes">
&reftitle.notes;
<warning>
<para>
- The query string can be passed to the included file but
- <varname>$_GET</varname> is copied from the parent script and only
- <varname>$_SERVER['QUERY_STRING']</varname> is filled with the passed
- query string. The query string may only be passed when using Apache 2.
+ The query string can be passed to the included file but
+ <varname>$_GET</varname> is copied from the parent script and only
+ <varname>$_SERVER['QUERY_STRING']</varname> is filled with the passed
+ query string. The query string may only be passed when using Apache 2.
The requested file will not be listed in the Apache access log.
</para>
</warning>
@@ -97,6 +104,16 @@
</note>
¬e.apache.nsapi-module;
</refsect1>
+
+ <refsect1 role="seealso">
+ &reftitle.seealso;
+ <para>
+ <simplelist>
+ <member><function>apache_note</function></member>
+ </simplelist>
+ </para>
+ </refsect1>
+
</refentry>
<!-- Keep this comment at the end of the file
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic