Hey all,
I have encountered something strange in a script. I am trying to write an XML header and then fill in the file:
Code: $xmlFile = "fetchableData.xml";
$fh = fopen($xmlFile, 'r+');
$housingData = updateHousingAndReturnXML();
$xmlData = '<?xml version="1.0" ?>'.$housingData;
// echo $xmlData;
fwrite($fh,$xmlData);
fclose($fh);
This code fills the file with the contents of $housingData, but <?xml version="1.0" ?> is not added. If I break up <? it will add it but then I get errors when parsing the XML.
Echoing the string also doesn't work with <?.
I guess what is happening is that the string is getting parsed by the PHP engine for some reason. Escaping <? doesn't work.
I am assuming I am missing something basic. But the manual doesn't say anything about <? being parsed in strings.
Help?
Thanks
HOW to get the bind variables list.
I've the following problem : I've some SQL queries stored in my DB as VARCHAR2 values.
need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which stylesheet a user chooses from the administration backend of a wordpress theme. The sizes of the images
Apart from cron
I need to run a php file every one hour. Is there any other solution apart from cron job?
Need Successful Return
Hello I am currently working a form here, and I have everything figured out except when I click the return button from my preview view. the information is lost in all the textarea's. Any clue what I
error with opendir
when i do this if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $files[$mone]=$file;
Scene graph using Direct3D?
There are several C++ scene graph based packages available for OpenGl, like say OSG,http://www.openscenegraph.org/projects/osgBut do you by any chance know about such a package based on Direct3D?Thank
convert pps to wsf with php'how?
hii want to convert with php PowerPoint file to swf file(flash)how please?thank!!!
Scrolling news bar and MySQL
I am not sure if this is the correct forum to post this on. If not, I apologize. I am still pretty new to PHP. I am editing a website for a friend. He had a news headlines section on his home
Problem with php's rename function
So, i'm having a problem with the php rename function. Basically my script 'delete_user.php' attempts to copy the users xml file(i stored all users information, in xml files as a backup of my
PHP Script runs on CLI but not through web browser
I am running into an issue that I just can't seem to find the answer to. I have a Windows Server 2008 box that is running Apache 2.2.14, PHP 5.2.11, and MySQL 5.1.39. My problem is I am trying to call