2001-11-10 21:49:43 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2001-12-16 09:10:54 +00:00
|
|
|
<!-- $Revision: 1.20 $ -->
|
1999-06-06 18:51:02 +00:00
|
|
|
<reference id="ref.apache">
|
2000-04-03 15:57:42 +00:00
|
|
|
<title>Apache-specific Functions</title>
|
1999-06-06 18:51:02 +00:00
|
|
|
<titleabbrev>Apache</titleabbrev>
|
|
|
|
|
|
|
|
<refentry id="function.apache-lookup-uri">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>apache_lookup_uri</refname>
|
1999-12-16 23:11:51 +00:00
|
|
|
<refpurpose>
|
|
|
|
Perform a partial request for the specified URI and return all
|
|
|
|
info about it
|
|
|
|
</refpurpose>
|
1999-06-06 18:51:02 +00:00
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<funcsynopsis>
|
2000-06-24 07:38:45 +00:00
|
|
|
<funcprototype>
|
2001-08-12 22:16:08 +00:00
|
|
|
<funcdef>object <function>apache_lookup_uri</function></funcdef>
|
2000-06-24 07:38:45 +00:00
|
|
|
<paramdef>string <parameter>filename</parameter></paramdef>
|
|
|
|
</funcprototype>
|
1999-06-06 18:51:02 +00:00
|
|
|
</funcsynopsis>
|
|
|
|
<para>
|
1999-06-28 01:22:31 +00:00
|
|
|
This performs a partial request for a URI. It goes just far
|
|
|
|
enough to obtain all the important information about the given
|
|
|
|
resource and returns this information in a class. The properties
|
|
|
|
of the returned class are:
|
|
|
|
<simplelist>
|
|
|
|
<member>status</member>
|
|
|
|
<member>the_request</member>
|
|
|
|
<member>status_line</member>
|
|
|
|
<member>method</member>
|
|
|
|
<member>content_type</member>
|
|
|
|
<member>handler</member>
|
|
|
|
<member>uri</member>
|
|
|
|
<member>filename</member>
|
|
|
|
<member>path_info</member>
|
|
|
|
<member>args</member>
|
|
|
|
<member>boundary</member>
|
|
|
|
<member>no_cache</member>
|
|
|
|
<member>no_local_copy</member>
|
|
|
|
<member>allowed</member>
|
|
|
|
<member>send_bodyct</member>
|
|
|
|
<member>bytes_sent</member>
|
|
|
|
<member>byterange</member>
|
|
|
|
<member>clength</member>
|
|
|
|
<member>unparsed_uri</member>
|
|
|
|
<member>mtime</member>
|
|
|
|
<member>request_time</member>
|
|
|
|
</simplelist>
|
1999-12-16 23:11:51 +00:00
|
|
|
</para>
|
|
|
|
<note>
|
|
|
|
<simpara>
|
2001-06-23 20:10:52 +00:00
|
|
|
<function>apache_lookup_uri</function> only works when PHP
|
2000-04-03 15:57:42 +00:00
|
|
|
is installed as an Apache module.
|
1999-12-16 23:11:51 +00:00
|
|
|
</simpara>
|
|
|
|
</note>
|
1999-06-06 18:51:02 +00:00
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
1999-12-16 23:11:51 +00:00
|
|
|
|
1999-06-06 18:51:02 +00:00
|
|
|
<refentry id="function.apache-note">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>apache_note</refname>
|
|
|
|
<refpurpose>Get and set apache request notes</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<funcsynopsis>
|
2000-06-24 07:38:45 +00:00
|
|
|
<funcprototype>
|
|
|
|
<funcdef>string <function>apache_note</function></funcdef>
|
|
|
|
<paramdef>string <parameter>note_name</parameter></paramdef>
|
|
|
|
<paramdef>string
|
|
|
|
<parameter>
|
|
|
|
<optional>note_value</optional>
|
|
|
|
</parameter>
|
|
|
|
</paramdef>
|
|
|
|
</funcprototype>
|
1999-06-06 18:51:02 +00:00
|
|
|
</funcsynopsis>
|
|
|
|
<para>
|
2001-06-23 20:10:52 +00:00
|
|
|
<function>apache_note</function> is an Apache-specific function
|
1999-06-06 18:51:02 +00:00
|
|
|
which gets and sets values in a request's
|
|
|
|
<literal>notes</literal> table. If called with one argument, it
|
|
|
|
returns the current value of note
|
|
|
|
<literal>note_name</literal>. If called with two arguments, it
|
|
|
|
sets the value of note <literal>note_name</literal> to
|
|
|
|
<literal>note_value</literal> and returns the previous value of
|
1999-12-16 23:11:51 +00:00
|
|
|
note <literal>note_name</literal>.
|
|
|
|
</para>
|
1999-06-06 18:51:02 +00:00
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
2001-05-18 20:47:09 +00:00
|
|
|
<refentry id="function.ascii2ebcdic">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>ascii2ebcdic</refname>
|
|
|
|
<refpurpose>Translate string from ASCII to EBCDIC</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<funcsynopsis>
|
|
|
|
<funcprototype>
|
|
|
|
<funcdef>int <function>ascii2ebcdic</function></funcdef>
|
|
|
|
<paramdef>string <parameter>ascii_str</parameter></paramdef>
|
|
|
|
</funcprototype>
|
|
|
|
</funcsynopsis>
|
|
|
|
<para>
|
|
|
|
<function>ascii2ebcdic</function> is an Apache-specific function which
|
|
|
|
is available only on EBCDIC based operating systems (OS/390, BS2000).
|
|
|
|
It translates the ASCII encoded string <parameter>ascii_str</parameter>
|
|
|
|
to its equivalent EBCDIC representation (binary safe), and returns
|
|
|
|
the result.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
See also the reverse function <function>ebcdic2ascii</function>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<refentry id="function.ebcdic2ascii">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>ebcdic2ascii</refname>
|
|
|
|
<refpurpose>Translate string from EBCDIC to ASCII</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<funcsynopsis>
|
|
|
|
<funcprototype>
|
|
|
|
<funcdef>int <function>ebcdic2ascii</function></funcdef>
|
|
|
|
<paramdef>string <parameter>ebcdic_str</parameter></paramdef>
|
|
|
|
</funcprototype>
|
|
|
|
</funcsynopsis>
|
|
|
|
<para>
|
|
|
|
<function>ebcdic2ascii</function> is an Apache-specific function which
|
|
|
|
is available only on EBCDIC based operating systems (OS/390, BS2000).
|
|
|
|
It translates the EBCDIC encoded string <parameter>ebcdic_str</parameter>
|
|
|
|
to its equivalent ASCII representation (binary safe), and returns
|
|
|
|
the result.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
See also the reverse function <function>ascii2ebcdic</function>
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
1999-06-06 18:51:02 +00:00
|
|
|
<refentry id="function.getallheaders">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>getallheaders</refname>
|
|
|
|
<refpurpose>Fetch all HTTP request headers</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<funcsynopsis>
|
2000-06-24 07:38:45 +00:00
|
|
|
<funcprototype>
|
|
|
|
<funcdef>array <function>getallheaders</function></funcdef>
|
2001-05-16 18:33:21 +00:00
|
|
|
<void/>
|
2000-06-24 07:38:45 +00:00
|
|
|
</funcprototype>
|
1999-06-06 18:51:02 +00:00
|
|
|
</funcsynopsis>
|
|
|
|
<para>
|
1999-12-16 23:11:51 +00:00
|
|
|
This function returns an associative array of all the HTTP
|
|
|
|
headers in the current request.
|
2000-07-29 15:39:39 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
1999-12-16 23:11:51 +00:00
|
|
|
<note>
|
|
|
|
<para>
|
|
|
|
You can also get at the value of the common CGI variables by
|
|
|
|
reading them from the environment, which works whether or not
|
|
|
|
you are using PHP as an Apache module. Use
|
|
|
|
<function>phpinfo</function> to see a list of all of the
|
|
|
|
environment variables defined this way.
|
|
|
|
</para>
|
|
|
|
</note>
|
2000-07-29 15:39:39 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
1999-06-06 18:51:02 +00:00
|
|
|
<example>
|
1999-12-16 23:11:51 +00:00
|
|
|
<title><function>getallheaders</function> Example</title>
|
|
|
|
<programlisting role="php">
|
2001-11-18 03:07:18 +00:00
|
|
|
<![CDATA[
|
1999-06-06 18:51:02 +00:00
|
|
|
$headers = getallheaders();
|
2000-04-03 15:57:42 +00:00
|
|
|
while (list ($header, $value) = each ($headers)) {
|
2001-12-03 18:18:05 +00:00
|
|
|
echo "$header: $value<br />\n";
|
1999-06-06 18:51:02 +00:00
|
|
|
}
|
2001-11-18 03:07:18 +00:00
|
|
|
]]>
|
1999-12-16 23:11:51 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
2000-07-29 15:39:39 +00:00
|
|
|
</para>
|
|
|
|
<para>
|
1999-12-16 23:11:51 +00:00
|
|
|
This example will display all the request headers for the current
|
|
|
|
request.
|
1999-06-06 18:51:02 +00:00
|
|
|
<note>
|
|
|
|
<simpara>
|
2001-06-23 20:10:52 +00:00
|
|
|
<function>getallheaders</function> is currently only supported
|
1999-06-06 18:51:02 +00:00
|
|
|
when PHP runs as an <productname>Apache</productname> module.
|
|
|
|
</simpara>
|
1999-12-16 23:11:51 +00:00
|
|
|
</note>
|
|
|
|
</para>
|
1999-06-06 18:51:02 +00:00
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<refentry id="function.virtual">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>virtual</refname>
|
|
|
|
<refpurpose>Perform an Apache sub-request</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<funcsynopsis>
|
2000-06-24 07:38:45 +00:00
|
|
|
<funcprototype>
|
|
|
|
<funcdef>int <function>virtual</function></funcdef>
|
|
|
|
<paramdef>string <parameter>filename</parameter></paramdef>
|
|
|
|
</funcprototype>
|
1999-06-06 18:51:02 +00:00
|
|
|
</funcsynopsis>
|
|
|
|
<para>
|
2001-06-23 20:10:52 +00:00
|
|
|
<function>virtual</function> is an Apache-specific function which
|
1999-06-28 01:22:31 +00:00
|
|
|
is equivalent to <!--#include virtual...--> in mod_include.
|
2000-04-03 15:57:42 +00:00
|
|
|
It performs an Apache sub-request. It is useful for including
|
|
|
|
CGI scripts or .shtml files, or anything else that you would
|
|
|
|
parse through Apache. Note that for a CGI script, the script
|
|
|
|
must generate valid CGI headers. At the minimum that means it
|
|
|
|
must generate a Content-type header. For PHP files, you need to
|
|
|
|
use <function>include</function> or <function>require</function>;
|
|
|
|
<function>virtual</function> cannot be used to include a document
|
|
|
|
which is itself a PHP file.
|
1999-12-16 23:11:51 +00:00
|
|
|
</para>
|
1999-06-06 18:51:02 +00:00
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
2001-12-16 09:10:54 +00:00
|
|
|
<refentry id='function.apache-child-terminate'>
|
|
|
|
<refnamediv>
|
|
|
|
<refname>apache_child_terminate</refname>
|
|
|
|
<refpurpose>Terminate apache process after this request</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<funcsynopsis>
|
|
|
|
<funcprototype>
|
|
|
|
<funcdef>string <function>apache_child_terminate</function></funcdef>
|
|
|
|
<void/>
|
|
|
|
</funcprototype>
|
|
|
|
</funcsynopsis>
|
|
|
|
<para>
|
|
|
|
<function>apache_child_terminate</function> will terminate the apache
|
|
|
|
process executing the current PHP request. It may be used to terminate
|
|
|
|
a process after a script with high memory consumption has been run
|
|
|
|
as memory will usualy only be freed internaly but not given back
|
|
|
|
to the operation system.
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
|
|
|
<refentry id='function.apache-setenv'>
|
|
|
|
<refnamediv>
|
|
|
|
<refname>apache_setenv</refname>
|
|
|
|
<refpurpose>Set an Apache subprocess_env variable</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<funcsynopsis>
|
|
|
|
<funcprototype>
|
|
|
|
<funcdef>int <function>apache_setenv</function></funcdef>
|
|
|
|
<paramdef>string <parameter>variable</parameter></paramdef>
|
|
|
|
<paramdef>string <parameter>value</parameter></paramdef>
|
|
|
|
<paramdef>bool <parameter><optional>walk_to_top</optional></parameter></paramdef>
|
|
|
|
</funcprototype>
|
|
|
|
</funcsynopsis>
|
|
|
|
<para>
|
|
|
|
&warn.undocumented.func;
|
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
|
|
|
1999-06-28 01:22:31 +00:00
|
|
|
</reference>
|
1999-06-06 18:51:02 +00:00
|
|
|
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
2001-12-12 20:47:43 +00:00
|
|
|
indent-tabs-mode:nil
|
1999-06-06 18:51:02 +00:00
|
|
|
sgml-parent-document:nil
|
1999-12-16 23:11:51 +00:00
|
|
|
sgml-default-dtd-file:"../../manual.ced"
|
1999-06-06 18:51:02 +00:00
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
2001-09-21 22:47:49 +00:00
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
1999-06-06 18:51:02 +00:00
|
|
|
-->
|