XML from a file list?
XML from a file list?
Out of context: Reply #2
- Started
- Last post
- 4 Responses
- unfittoprint0
use opendir on your target folder contents
http://pt.php.net/opendiruse readdir in a while loop to retrieve your folder contents
http://pt.php.net/readdir
while (false !== ($file = readdir($handle)))use eregi function to filter your content and $file != "." && $file != ".." to avoid folders
http://pt.php.net/eregiin each loop add your node to a string variable.
echo it at the end [encode your var using utf8_encode just as a precaution].
note: before the loop write your xml header [firefox testing]
good luck.