i was writing code (domxml) in php 5 and when i upload my files to server i realised that server had php 4. now problem how can i load an xml file set an attribute create an element with some text in the element and finally SAVE IT!!! so simple but i was searcing too many hours to the internet and i found nothing that could help me. Please if you can write a simple script not a link to another site Thank you in advance CHRIS
most servers can be configured to run either php 4 or 5. Read your hosts faqs or similar documentation to see if they have the feature.
I didn't find such an option... a small script somebody? In php 5 i had this script: $xmlDoc = new DomDocument(); $xmlDoc->load("xml/" . $_POST["category"] . ".xml"); $pictures = $xmlDoc -> getElementsByTagName("pictures") -> item(0); $number=$pictures -> getAttributeNode('number') -> value; $number=$number+1; $pictures -> setAttribute('number',$number); $name = $xmlDoc -> createElement('name', $_FILES["file"]["name"]); $pictures -> insertbefore($name,$pictures->firstChild); $xmlDoc -> save("xml/" . $_POST["category"] . ".xml"); How can i return it to php 4? please help me. Thank u in advance Chris
I advise you contact your host inquiring about if you can run PHP5. Reason I say this is PHP4 hit it's end of life and is no longer supported. Almost all hosts are running PHP5 now so I'm confused why your host is still running 4.
yes i did that and i am waiting an answer... I'am wondering, too, why my host is still running php 4.... but if someone can write a script i would be grateful
they told me that i must pay sth more in order to transfer my domain name se windows package. now it is in linux package... how can i save an xml file in php 4?? It can;t be too difficult....