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@351086 c90b9560-bf6c-de11-be94-00142212c4b1
130 lines
3.1 KiB
XML
130 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: dec1f8445ab2af7fbafef012fb7907ab2cd349b5 Maintainer: pastore Status: ready -->
|
|
<!-- CREDITS: cortesi,fernando -->
|
|
<!-- splitted from ./en/functions/dir.xml, last change in rev 1.2 -->
|
|
<refentry xml:id="function.chdir" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>chdir</refname>
|
|
<refpurpose>Cambia directory</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>chdir</methodname>
|
|
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Cambia la directory corrente di PHP in
|
|
<parameter>directory</parameter>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>directory</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La nuova directory corrente
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
Genera un errore di livello <constant>E_WARNING</constant> in caso di errore.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Esempio di <function>chdir</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// directory corrente
|
|
echo getcwd() . "\n";
|
|
|
|
chdir('public_html');
|
|
|
|
// directory corrente
|
|
echo getcwd() . "\n";
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
/home/vincent
|
|
/home/vincent/public_html
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<caution>
|
|
<para>
|
|
Se l'interprete PHP è stato creato con ZTS (Zend Thread Safety) abilitato,
|
|
qualsiasi modifica alla directory corrente effettuata tramite <function>chdir</function>
|
|
sarà invisibile al sistema operativo. Tutte le funzioni PHP integrate
|
|
rispetteranno comunque il cambiamento nella directory corrente; ma le funzioni di libreria
|
|
esterne chiamate usando <link linkend="book.ffi">FFI</link> non lo faranno. Si
|
|
può verificare se la propria copia di PHP è stata creata con ZTS usando
|
|
<command>php -i</command> o la costante built-in
|
|
<constant>PHP_ZTS</constant>.
|
|
</para>
|
|
</caution>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><function>getcwd</function></member>
|
|
</simplelist>
|
|
</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
|
|
-->
|