libxml libxml_set_streams_context
(PHP 5, PHP 7, PHP 8)
libxml_set_streams_context — 다음 libxml 문서 로드 또는 쓰기에 대한 스트림 컨텍스트 설정
설명
libxml_set_streams_context(resource $context
): void
다음 libxml 문서 로드 또는 쓰기에 대한 스트림 컨텍스트를 설정합니다.
매개변수
context
- 스트림 컨텍스트 리소스(stream_context_create()로 생성)
반환 값
값이 반환되지 않습니다.
Examples
예제 #1 libxml_set_streams_context() 예제
<?php
$opts = array(
'http' => array(
'user_agent' => 'PHP libxml agent',
)
);
$context = stream_context_create($opts);
libxml_set_streams_context($context);
// request a file through HTTP
$doc = DOMDocument::load('http://www.example.com/file.xml');
?>
기타
- stream_context_create() - 스트림 컨텍스트를 만듭니다.