nlopess Fri Jan 16 15:03:06 2004 EDT
Modified files: /phpdoc/en/reference/apache/functions apache-lookup-uri.xml Log: added example Index: phpdoc/en/reference/apache/functions/apache-lookup-uri.xml diff -u phpdoc/en/reference/apache/functions/apache-lookup-uri.xml:1.2 phpdoc/en/reference/apache/functions/apache-lookup-uri.xml:1.3 --- phpdoc/en/reference/apache/functions/apache-lookup-uri.xml:1.2 Wed Apr 17 02:36:20 2002 +++ phpdoc/en/reference/apache/functions/apache-lookup-uri.xml Fri Jan 16 15:03:06 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/apache.xml, last change in rev 1.2 --> <refentry id="function.apache-lookup-uri"> <refnamediv> @@ -44,6 +44,50 @@ <member>request_time</member> </simplelist> </para> + <para> + <example> + <title><function>apache_lookup_uri</function> example</title> + <programlisting role="php"> +<![CDATA[ +<?php +$info = apache_lookup_uri('index.php?var=value'); +print_r($info); + +if (file_exists($info->filename)) + echo 'file exists!'; +?> +]]> + </programlisting> + <para> + The above example will output something similar with: + </para> + <screen> +<![CDATA[ +stdClass Object +( + [status] => 200 + [the_request] => GET /dir/file.php HTTP/1.1 + [method] => GET + [mtime] => 0 + [clength] => 0 + [chunked] => 0 + [content_type] => application/x-httpd-php + [no_cache] => 0 + [no_local_copy] => 1 + [unparsed_uri] => /dir/index.php?var=value + [uri] => /dir/index.php + [filename] => /home/htdocs/dir/index.php + [args] => var=value + [allowed] => 0 + [sent_bodyct] => 0 + [bytes_sent] => 0 + [request_time] => 1074282764 +) +file exists! +]]> + </screen> + </example> + </para> <note> <simpara> <function>apache_lookup_uri</function> only works when PHP