note 97554 added to class.domdocument

From: Date: Mon, 26 Apr 2010 05:47:23 +0000
Subject: note 97554 added to class.domdocument
Groups: php.notes 
Request: Send a blank email to php-notes+get-168634@lists.php.net to get a copy of this message
Using AJAX? Then make sure you put a header directive like the following at the top of your php file. header( "content-type: application/xml; charset=ISO-8859-15" ); Had to read every comment to find this as it was noted as the first post to this document by Fernando H back in 2008. I'm reposting this snippet as I think a lot of people, like me, will be using this for dynamically generating XML for JavaScript (i.e. AJAX). If you don't add this header then your javascript downloadURL function will not work because the content type will not be recognised to be XML. ---- Server IP: 69.147.83.197 Probable Submitter: 124.170.167.177 ---- Manual Page -- http://www.php.net/manual/en/class.domdocument.php Edit -- https://master.php.net/note/edit/97554 Del: integrated -- https://master.php.net/note/delete/97554/integrated Del: useless -- https://master.php.net/note/delete/97554/useless Del: bad code -- https://master.php.net/note/delete/97554/bad+code Del: spam -- https://master.php.net/note/delete/97554/spam Del: non-english -- https://master.php.net/note/delete/97554/non-english Del: in docs -- https://master.php.net/note/delete/97554/in+docs Del: other reasons-- https://master.php.net/note/delete/97554 Reject -- https://master.php.net/note/reject/97554 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#168634) next »