简体   繁体   中英

Populating XML file in PHP

Currently, a friend of mine is wanting a Flash Gallery and the ability to upload files. I don't have the time of day to teach him where to edit the XML properly or dare I even give him FTP access.

He hand picked out this gallery program: http://flashnifties.com/xml_gallery.php Which as you can tell works off XML.

Creating a script to have him upload files to a directory is a non-issue. My issue is that what's the proper way to loop through a directory and populate an XML file.

A friend suggested the PHP function SimpleXML and I was wondering if anyone else had a similar solution.

  1. DirectoryIterator for looping through directory (possibly even RecursiveDirectoryIterator)
  2. SimpleXML indeed to build (simple) XML

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM