mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- Document setrawcookie()
#- Some holiday hacking :-) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@150710 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
ad007fee69
commit
3690711874
3 changed files with 63 additions and 8 deletions
|
@ -1,12 +1,13 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<!-- $Revision: 1.16 $ -->
|
||||
<chapter id="features.cookies">
|
||||
<title>Cookies</title>
|
||||
|
||||
<para>
|
||||
PHP transparently supports HTTP cookies. Cookies are a mechanism for
|
||||
storing data in the remote browser and thus tracking or identifying return
|
||||
users. You can set cookies using the <function>setcookie</function>
|
||||
users. You can set cookies using the <function>setcookie</function> or
|
||||
<function>setrawcookie</function>
|
||||
function. Cookies are part of the HTTP header, so
|
||||
<function>setcookie</function> must be called before any output is sent to
|
||||
the browser. This is the same limitation that <function>header</function>
|
||||
|
@ -33,7 +34,8 @@
|
|||
|
||||
<para>
|
||||
For more details, including notes on browser bugs, see the
|
||||
<function>setcookie</function> function.
|
||||
<function>setcookie</function> and <function>setrawcookie</function>
|
||||
function.
|
||||
</para>
|
||||
|
||||
</chapter>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.27 $ -->
|
||||
<!-- $Revision: 1.28 $ -->
|
||||
<!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.setcookie">
|
||||
<refnamediv>
|
||||
|
@ -225,8 +225,10 @@ setcookie("TestCookie", $value, time()+3600, "/~rasmus/", ".example.com", 1);
|
|||
Note that the value portion of the cookie will automatically be
|
||||
urlencoded when you send the cookie, and when it is received, it
|
||||
is automatically decoded and assigned to a variable by the same
|
||||
name as the cookie name. To see the contents of our test
|
||||
cookie in a script, simply use one of the following examples:
|
||||
name as the cookie name. If you don't want this, you can use
|
||||
<function>setrawcookie</function> instead if you are using PHP 5. To see
|
||||
the contents of our test cookie in a script, simply use one of the
|
||||
following examples:
|
||||
</para>
|
||||
<para>
|
||||
<informalexample>
|
||||
|
@ -329,8 +331,8 @@ one : cookieone
|
|||
</simpara>
|
||||
</note>
|
||||
<para>
|
||||
See also <function>header</function> and the
|
||||
<link linkend="features.cookies">cookies section</link>.
|
||||
See also <function>header</function>, <function>setrawcookie</function>
|
||||
and the <link linkend="features.cookies">cookies section</link>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
|
51
reference/http/functions/setrawcookie.xml
Normal file
51
reference/http/functions/setrawcookie.xml
Normal file
|
@ -0,0 +1,51 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.1 $ -->
|
||||
<!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.setrawcookie">
|
||||
<refnamediv>
|
||||
<refname>setrawcookie</refname>
|
||||
<refpurpose>Send a cookie without urlencoding the cookie value</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<methodsynopsis>
|
||||
<type>bool</type><methodname>setrawcookie</methodname>
|
||||
<methodparam><type>string</type><parameter>name</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>value</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>expire</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>path</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>string</type><parameter>domain</parameter></methodparam>
|
||||
<methodparam choice="opt"><type>int</type><parameter>secure</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
<para>
|
||||
<function>setrawcookie</function> is exactly the same as
|
||||
<function>setcookie</function> except that the cookie value will not
|
||||
automaticall be urlencoded when send to the browser.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>header</function>, <function>setcookie</function> and the
|
||||
<link linkend="features.cookies">cookies section</link>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<!-- 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
|
||||
indent-tabs-mode:nil
|
||||
sgml-parent-document:nil
|
||||
sgml-default-dtd-file:"../../../../manual.ced"
|
||||
sgml-exposed-tags:nil
|
||||
sgml-local-catalogs:nil
|
||||
sgml-local-ecat-files:nil
|
||||
End:
|
||||
vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
Loading…
Reference in a new issue