mirror of
https://github.com/php/doc-it.git
synced 2026-03-24 15:42:46 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@313948 c90b9560-bf6c-de11-be94-00142212c4b1
91 lines
2.4 KiB
XML
91 lines
2.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- splitted from ./it/functions/session.xml, last change in rev 1.1 -->
|
|
<!-- last change to 'session-destroy' in en/ tree in rev 1.2 -->
|
|
<!-- EN-Revision: n/a Maintainer: penzo Status: ready -->
|
|
<!-- OLD-Revision: 1.83/EN.1.2 -->
|
|
<refentry xml:id="function.session-destroy" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>session_destroy</refname>
|
|
<refpurpose>Distrugge tutti i dati registrati in una sessione</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Descrizione</title>
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>session_destroy</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
<function>session_destroy</function> distrugge tutti i dati
|
|
associati alla sessione corrente. Non desetta nessuna delle
|
|
variabili globali associate alla sessione o desetta il cookie di
|
|
sessione.
|
|
</simpara>
|
|
<simpara>
|
|
Questa funzione ritorna &true; in caso di successo e
|
|
&false; in caso di fallimento nel distruggere
|
|
i dati di sessione.
|
|
</simpara>
|
|
<para>
|
|
<example>
|
|
<title>Distruggere una sessione</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// Inizializza la sessione.
|
|
// Se state usando session_name("qualcosa"), non dimenticatevelo adesso!
|
|
session_start();
|
|
// Desetta tutte le variabili di sessione.
|
|
session_unset();
|
|
// Infine , distrugge la sessione.
|
|
session_destroy();
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Distruggere una sessione con $_SESSION</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// Inizializza la sessione.
|
|
// Se state usando session_name("qualcosa"), non dimenticatevelo adesso!
|
|
session_start();
|
|
// Desetta tutte le variabili di sessione.
|
|
$_SESSION = array();
|
|
// Infine distrugge la sessione.
|
|
session_destroy();
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</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:"~/.phpdoc/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
|
|
-->
|