如何把post过来的内容在xml里面分行存储?

chdach 2009-07-27 03:44:08

//创建一个新 thread节点
$thread = $guestbook->createElement('thread');
$threads->appendChild($thread);
//在新的 thread节点上创建 title标签
$title = $guestbook->createElement('title');
$title->appendChild($guestbook->createTextNode($_POST['title']));
$thread->appendChild($title);
//在新的 thread节点上创建 author标签
$author = $guestbook->createElement('author');
$author->appendChild($guestbook->createTextNode($_POST['author']));
$thread->appendChild($author);

想把post过来的内容存储在xml里,如何把post过来的title,author,thread分行存储?
(我不清楚是不是修改上面的代码)
...全文
82 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
chdach 2009-07-27
  • 打赏
  • 举报
回复
能详细点吗,怎么循环?
wzwen 2009-07-27
  • 打赏
  • 举报
回复
循环存储节点
fenyao 2009-07-27
  • 打赏
  • 举报
回复
关注
chdach 2009-07-27
  • 打赏
  • 举报
回复
人呢?急啊

21,893

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧