mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@34215 c90b9560-bf6c-de11-be94-00142212c4b1
239 lines
7.5 KiB
XML
239 lines
7.5 KiB
XML
<reference id="ref.apache">
|
|
<title>Apache-specific Functions</title>
|
|
<titleabbrev>Apache</titleabbrev>
|
|
|
|
<refentry id="function.apache-lookup-uri">
|
|
<refnamediv>
|
|
<refname>apache_lookup_uri</refname>
|
|
<refpurpose>
|
|
Perform a partial request for the specified URI and return all
|
|
info about it
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>class <function>apache_lookup_uri</function></funcdef>
|
|
<paramdef>string <parameter>filename</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
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>
|
|
</para>
|
|
<note>
|
|
<simpara>
|
|
<function>Apache_lookup_uri</function> only works when PHP
|
|
is installed as an Apache module.
|
|
</simpara>
|
|
</note>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.apache-note">
|
|
<refnamediv>
|
|
<refname>apache_note</refname>
|
|
<refpurpose>Get and set apache request notes</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<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>
|
|
</funcsynopsis>
|
|
<para>
|
|
<function>Apache_note</function> is an Apache-specific function
|
|
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
|
|
note <literal>note_name</literal>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.getallheaders">
|
|
<refnamediv>
|
|
<refname>getallheaders</refname>
|
|
<refpurpose>Fetch all HTTP request headers</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>array <function>getallheaders</function></funcdef>
|
|
<paramdef>void<parameter></parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
This function returns an associative array of all the HTTP
|
|
headers in the current request.
|
|
</para>
|
|
<para>
|
|
<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>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title><function>getallheaders</function> Example</title>
|
|
<programlisting role="php">
|
|
$headers = getallheaders();
|
|
while (list ($header, $value) = each ($headers)) {
|
|
echo "$header: $value<br>\n";
|
|
}
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
This example will display all the request headers for the current
|
|
request.
|
|
<note>
|
|
<simpara>
|
|
<function>Getallheaders</function> is currently only supported
|
|
when PHP runs as an <productname>Apache</productname> module.
|
|
</simpara>
|
|
</note>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<refentry id="function.virtual">
|
|
<refnamediv>
|
|
<refname>virtual</refname>
|
|
<refpurpose>Perform an Apache sub-request</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<funcsynopsis>
|
|
<funcprototype>
|
|
<funcdef>int <function>virtual</function></funcdef>
|
|
<paramdef>string <parameter>filename</parameter></paramdef>
|
|
</funcprototype>
|
|
</funcsynopsis>
|
|
<para>
|
|
<function>Virtual</function> is an Apache-specific function which
|
|
is equivalent to <!--#include virtual...--> in mod_include.
|
|
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.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<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>
|
|
|
|
</reference>
|
|
|
|
<!-- 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
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
-->
|