1
0
mirror of https://github.com/php/doc-ja.git synced 2026-03-24 07:02:08 +01:00
Files
archived-doc-ja/reference/libxml/functions/libxml-disable-entity-loader.xml
2025-09-07 21:12:47 +09:00

160 lines
4.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<!-- EN-Revision: 9b1673cf114a1e10c4563ab9223cb56aed552b89 Maintainer: takagi Status: ready -->
<!-- Credits: mumumu -->
<refentry xml:id="function.libxml-disable-entity-loader" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>libxml_disable_entity_loader</refname>
<refpurpose>外部エンティティの読み込み機能を無効にする</refpurpose>
</refnamediv>
<refsynopsisdiv>
&warn.deprecated.function-8-0-0;
</refsynopsisdiv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<modifier role="attribute">#[\Deprecated]</modifier>
<type>bool</type><methodname>libxml_disable_entity_loader</methodname>
<methodparam choice="opt"><type>bool</type><parameter>disable</parameter><initializer>&true;</initializer></methodparam>
</methodsynopsis>
<para>
外部エンティティ読み込み機能の有効/無効を切り替えます。
外部エンティティの読み込みを無効にすると、
XML文書を読み込む際に問題が起こる可能性があることに注意して下さい。
</para>
<para>
libxml 2.9.0 以降では、エンティティの置換はデフォルトで無効になっているため、<constant>LIBXML_NOENT</constant>,
<constant>LIBXML_DTDVALID</constant>, or <constant>LIBXML_DTDLOAD</constant>.
を使って内部エンティティの参照を解決する必要がない限り、
外部エンティティの読み込みを無効にする必要はありません。
一般的には、外部エンティティの読み込みを抑制するのであれば、
<function>libxml_set_external_entity_loader</function> を使うことが望ましいです。
<constant>LIBXML_NO_XXE</constant> 定数を使ってこれを防ぐこともできます (PHP 8.4.0 以降、Libxml &gt;= 2.13.0 でのみ利用可能)。
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>disable</parameter></term>
<listitem>
<para>
libxml を使用する拡張モジュール
(<xref linkend="book.dom" /><xref linkend="book.xmlwriter" />
および <xref linkend="book.xmlreader" />) で、外部エンティティの読み込み機能を
無効 (&true;) あるいは有効 (&false;) にします。
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
変更前の値を返します。
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>8.0.0</entry>
<entry>
この関数は、推奨されなくなりました。
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</refsect1>
<!--
<refsect1 role="errors">
&reftitle.errors;
<para>
When does this function issue E_* level errors, and/or throw exceptions.
</para>
</refsect1>
-->
<!--
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title><function>libxml_disable_entity_loader</function> example</title>
<para>
Any text that describes the purpose of the example, or what
goes on in the example should be here.
</para>
<programlisting role="php">
<![CDATA[
<?php
/* ... */
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
...
]]>
</screen>
</example>
</para>
</refsect1>
-->
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>libxml_use_internal_errors</function></member>
<member><function>libxml_set_external_entity_loader</function></member>
<member>The <constant>LIBXML_NOENT</constant> 定数</member>
<member>The <constant>LIBXML_DTDVALID</constant> 定数</member>
<member>The <constant>LIBXML_NO_XXE</constant> 定数</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
-->