Re: PHP and XML

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, November 23, 2006 6:57 am, onewaylife wrote:
> I am novice in PHP & XML, while trying I am creating a small
> application
> i.e. Address Book.
> In this I am using Apache2, PHP5 and XML no database is used. I have
> FC5
> machines. but I am unable to store the files in XML. If any one share
> their
> experience in this by providing Examples or tutorials etc...
> So far I have found tutorial related to porting the information of
> data from
> MySQL to XML and then php with help of DOM.

You could just slap the whole address book into a single file with:
http://php.net/file_put_contents
http://php.net/file_get_contents

This, however, will get unwieldy for more than a few hundred addresses...

To "fix" that, you're going to have to basically re-implement a bunch
of functionality that is pretty much the nuts and bolts of a database,
so I'd suggest that maybe your inexperience is causing you to make a
Bad Choice for how to go about making an address book in the first
place. :-)

Note that you could also store it all in a database, and then provide
an XML output for, say, RSS or other portable reasons. And while it's
"more" work, the extra effort of the DB will actually be LESS work
than Doing It Right with just the raw file system access you propose.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux