...

View Full Version : Writing to XML



binaryWeapon
11-09-2007, 03:48 AM
Quick question:

Can you write to an xml file with the php fopen() and fwrite(), etc the same way as with a txt file?

gnomeontherun
11-09-2007, 03:53 AM
Pretty much yeah. Just make sure you add the xml declaration to the content and have it save as an .xml file.

Inigoesdr
11-09-2007, 04:44 AM
It's far easier to use SimpleXML (http://php.net/simplexml) for both reading and writing.

binaryWeapon
11-11-2007, 05:50 PM
On the simpleXML page:

The SimpleXML extension requires PHP 5.


My hosting plan has PHP4.

CFMaBiSmAd
11-11-2007, 06:10 PM
The end of life of php4 is the end of this year. Your web host will be forced to upgrade of get left behind.

They might already have php5 available, either through your control panel or through a statement in a .htaccess file. Check with them if and how you can switch to php5, or what their plan is to upgrade (this is not an "if" they are upgrading, but a "when" they are upgrading issue.)

binaryWeapon
11-11-2007, 06:14 PM
The end of life of php4 is the end of this year. Your web host will be forced to upgrade of get left behind.

They might already have php5 available, either through your control panel or through a statement in a .htaccess file. Check with them if and how you can switch to php5, or what their plan is to upgrade (this is not an "if" they are upgrading, but a "when" they are upgrading issue.)

Willdo! Thanks for your reply!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum