note 93478 added to function.simplexml-load-file
| From: | knl at bitflop dot com | Date: | Fri, 11 Sep 2009 19:02:15 +0000 |
| Subject: | note 93478 added to function.simplexml-load-file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-160471@lists.php.net to get a copy of this message | ||
If you need to parse the data from SimpleXML into a session variable remember to define the data as
a string first.
If you don't you will get warnings of "Node no longer exists" pointing to your
session_start() function.
This will work:
<?php
$new_version = simplexml_load_file('http://mywebsite/version.xml');
$_SESSION['current_version'] = (string)$new_version->version;
?>
----
Server IP: 195.184.96.15
Probable Submitter: 90.185.142.211
----
Manual Page -- http://www.php.net/manual/en/function.simplexml-load-file.php
Edit -- https://master.php.net/note/edit/93478
Del: integrated -- https://master.php.net/note/delete/93478/integrated
Del: useless -- https://master.php.net/note/delete/93478/useless
Del: bad code -- https://master.php.net/note/delete/93478/bad+code
Del: spam -- https://master.php.net/note/delete/93478/spam
Del: non-english -- https://master.php.net/note/delete/93478/non-english
Del: in docs -- https://master.php.net/note/delete/93478/in+docs
Del: other reasons-- https://master.php.net/note/delete/93478
Reject -- https://master.php.net/note/reject/93478
Search -- https://master.php.net/manage/user-notes.php