Disable the ability to load external entities

libxml_clear_errors
libxml_get_errors
libxml Functions
PHP Manual

# libxml_disable_entity_loader

(PHP 5 >= 5.2.11)

libxml_disable_entity_loader — Disable the ability to load external entities

### Description

bool libxml_disable_entity_loader ([ bool `$disable` = true ] )

Disable/enable the ability to load external entities.

### Parameters

`disable`

  Disable (`TRUE`) or enable (`FALSE`) libxml extensions (such as DOM, XMLWriter and XMLReader) to load external entities.

### Return Values

Returns the previous value.

### See Also

- libxml_use_internal_errors() - Disable libxml errors and allow user to fetch error information as needed
- The `LIBXML_NONET` constant

libxml_clear_errors
libxml_get_errors
libxml Functions
PHP Manual