Location: PHPKode > scripts > CGI.php > cgi-php/CGI_Docs.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
	<title>DocReader Online Converter</title>

	<link rel="stylesheet" type="text/css" href="/css/site.css" />
</head>
<body>

<a name="top"></a>

<h1>Package: CGI</h1>

<p style="margin-bottom: 10px; padding-bottom: 5px"><a href="#CGI">CGI</a><br />
</p>



<a name="CGI"></a><table width="98%" cellpadding="3" border="0" cellspacing="0">
									<tr>
										<td width="70%" class="head">
											<h1>public class CGI </h1>
										</td>
										<td width="30%" class="head" align="right">
											<a href="/index/docreader_view" class="textured">Return to package list</a>
										</td>
									</tr>
								</table>

<p><strong>Version: 1.0 <br />
Date: 2001-05-29 11:05:37</strong></p>



	<p><strong>Author: John Luxford &lt;<a href="mailto: hide@address.com">hide@address.com</a>&gt; &lt;<a href="http://www.simian.ca/">http://www.simian.ca/</a>&gt;</strong></p>



	<pre style="margin-bottom: 10px; padding-bottom: 5px"><strong>Summary</strong>
CGI is a class that is used to give GET and POST auto-generated
variables their own distinct namespace, so as not to conflict with other
auto-generated variables, such as Cookie data.  The CGI class gets its data
from the $HTTP_POST_VARS and $HTTP_GET_VARS hashes.

</pre>



	<pre style="margin-bottom: 10px; padding-bottom: 5px"><strong>Example</strong>
$cgi = new CGI;

// if a variable called 'query' was passed to this script, it can
// be accessed this way:
echo $cgi-&gt;query;

// or you can use the 'param' property to retrieve all of the names
// of the variables passed to this script:
foreach ($cgi-&gt;param as $p) {
	echo $cgi-&gt;{$p};
}

</pre>

  <table width="98%" cellpadding="3" border="0" cellspacing="0"><tr><td width="100%" class="head"><h1>Properties</h1></td></tr></table>

<h2 style="font-weight: normal">public array <strong>$param</strong></h2>


<pre style="margin-bottom: 10px; padding-bottom: 5px"><strong>Summary</strong>
Contains a list of the names of all the variables passed to the
current script through either the GET or POST methods.

</pre>



  <table width="98%" cellpadding="3" border="0" cellspacing="0"><tr><td width="100%" class="head"><h1>Methods</h1></td></tr></table>

<h2 style="font-weight: normal">public <strong>CGI</strong> () -> void</h2>


<pre style="margin-bottom: 10px; padding-bottom: 5px"><strong>Summary</strong>
Constructor method.

</pre>



  <h2 style="font-weight: normal">public <strong>parseUri</strong> () -> array </h2>


<pre style="margin-bottom: 10px; padding-bottom: 5px"><strong>Summary</strong>
Takes the global $REQUEST_URI variable and parses it as if
each subdirectory listing is a key/value pair, separated by periods (.),
and adds these pairs as properties of this object, and the keys to the
param array.  Any subdirectories that do not contain a period are returned
as extras.

</pre>




  <h2 style="font-weight: normal">public <strong>translateUri</strong> (string <strong>$uri</strong>, string <strong>$lose</strong>) -> string </h2>


<pre style="margin-bottom: 10px; padding-bottom: 5px"><strong>Summary</strong>
Takes an ordinary URI with GET parameters in it, and returns
a URI compatible with the parseUri method.  The optional lose parameter
is a comma-separated list of key/value pairs in the URI to lose, but
not from the parameter list (the stuff that follows the ?), but from
the first part of the URI.

</pre>






  



<p align="right"><a href="#top">Return to Top</a></p>

<hr size="1" noshade="noshade" />

<p align="center">This file was created by <a href="http://www.simian.ca/index/docreader">DocReader</a>, an <a href="http://www.simian.ca/index/open_license">Open Source</a> class documentation system.<br />
Visit <a href="http://www.simian.ca/">Simian Systems</a> to learn more.</p>

</body>
</html>
Return current item: CGI.php