note 72433 added to function.dom-domdocument-load
| From: | BadGuy | Date: | Thu, 18 Jan 2007 16:50:07 +0000 |
| Subject: | note 72433 added to function.dom-domdocument-load | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-121894@lists.php.net to get a copy of this message | ||
Note that this method uses the local file system before doing anything remote. The
'disadvantage' would be that if you would do the following:
<?php
$xml = new DOMDocument;
$xml->load("xmlsource/news.php");
?>
This would not make the method read the actual output of the news.php file --presumably valid xml
data--, but the file contents --obviously this would be php code. So this will return an error
saying news.php is missing the xml declaration and maybe the xml start-tag
What would work is the following:
<?php
$xml = new DOMDocument;
$xml->load("http://my.beautiful-website.com/xmlsource/news.php");
?>
This will force a http request to be used to get this file instead of just locally reading it and
the file just returning code
----
Server IP: 195.136.184.34
Probable Submitter: 83.5.150.246
----
Manual Page -- http://www.php.net/manual/en/function.dom-domdocument-load.php
Edit -- https://master.php.net/note/edit/72433
Del: integrated -- https://master.php.net/note/delete/72433/integrated
Del: useless -- https://master.php.net/note/delete/72433/useless
Del: bad code -- https://master.php.net/note/delete/72433/bad+code
Del: spam -- https://master.php.net/note/delete/72433/spam
Del: non-english -- https://master.php.net/note/delete/72433/non-english
Del: in docs -- https://master.php.net/note/delete/72433/in+docs
Del: other reasons-- https://master.php.net/note/delete/72433
Reject -- https://master.php.net/note/reject/72433
Search -- https://master.php.net/manage/user-notes.php