PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<libxml_get_last_errorlibxml_use_internal_errors>
Last updated: Mon, 16 Jul 2012

libxml_set_streams_context

(PHP 5)

libxml_set_streams_context --  Set the streams context for the next libxml document load or write

说明

void libxml_set_streams_context ( resource streams_context )

Sets the streams context for the next libxml document load or write.

参数

streams_context

The stream context resource (created with stream_context_create())

返回值

无返回值。

例子 1. A libxml_set_streams_context() example

<?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');

?>




<libxml_get_last_errorlibxml_use_internal_errors>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST