在 PHP 中填充 XML 文件

发布于 2024-09-06 02:43:17 字数 347 浏览 7 评论 0原文

目前,我的一个朋友想要一个 Flash Gallery 和上传文件的功能。我没有时间教他在哪里正确编辑 XML,我什至不敢给他 FTP 访问权限。

他亲手挑选了这个画廊程序:http://flashnifties.com/xml_gallery.php可以区分 XML 的工作原理。

创建一个脚本让他将文件上传到目录不是问题。我的问题是循环目录并填充 XML 文件的正确方法是什么。

一位朋友建议使用 PHP 函数 SimpleXML,我想知道其他人是否有类似的解决方案。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼趣 2024-09-13 02:43:17
  1. DirectoryIterator 用于循环目录(甚至可能是 RecursiveDirectoryIterator)
  2. SimpleXML 确实可以构建(简单)XML
  1. DirectoryIterator for looping through directory (possibly even RecursiveDirectoryIterator)
  2. SimpleXML indeed to build (simple) XML
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文