mirror of
https://github.com/php/doc-ja.git
synced 2026-03-25 15:42:08 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/ja/trunk@350873 c90b9560-bf6c-de11-be94-00142212c4b1
129 lines
3.3 KiB
XML
129 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- splitted from ./ja/functions/dir.xml, last change in rev 1.1 -->
|
|
<!-- EN-Revision: dec1f8445ab2af7fbafef012fb7907ab2cd349b5 Maintainer: hirokawa Status: ready -->
|
|
<!-- CREDITS: shimooka,mumumu -->
|
|
<refentry xml:id="function.chdir" xmlns="http://docbook.org/ns/docbook">
|
|
<refnamediv>
|
|
<refname>chdir</refname>
|
|
<refpurpose>ディレクトリを変更する</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<type>bool</type><methodname>chdir</methodname>
|
|
<methodparam><type>string</type><parameter>directory</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
PHP のカレントディレクトリを <parameter>directory</parameter>
|
|
に変更します。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>directory</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
新しいカレントディレクトリ
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
&return.success;
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="errors">
|
|
&reftitle.errors;
|
|
<para>
|
|
失敗した場合は <constant>E_WARNING</constant> レベルのエラーが発生します。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>chdir</function> の例</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
// カレントディレクトリ
|
|
echo getcwd() . "\n";
|
|
|
|
chdir('public_html');
|
|
|
|
// カレントディレクトリ
|
|
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>
|
|
PHP インタプリタが ZTS (Zend Thread Safety) を有効にしてビルドされている場合、
|
|
<function>chdir</function> 関数を使って行った現在のディレクトリの変更はオペレーティングシステムには見えません。
|
|
全てのPHPのビルトイン関数は、現在のディレクトリの変更を尊重しますが、
|
|
<link linkend="book.ffi">FFI</link> を使って呼び出された外部ライブラリはそうではありません。
|
|
あなたの PHP で ZTS が有効かどうかを調べるには、<command>php -i</command> コマンドを使うか、
|
|
ビルトイン定数<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
|
|
-->
|