douchi8503
douchi8503
2013-01-27 20:42

在joomla中生成xml文件[关闭]

已采纳

i'm new in joomla development coming with skills in FED development and make the first steps into server side world

i use to development with joomla and i have a problem

i need to generate xml file from php foreach argument

means i have some template in joomla with foreach to few article and i need to make from anyone of them xml row and write it to new xml file in joomla file system.

i spent allot of time to find some answer to my question and got in joomla! documentation this link is explain how to make the parse but not how to make the file, this part is missing to me and i need help

if can anyone help please?

thanks allot!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • dongti8535 dongti8535 8年前

    You can use JFile for that. Check this out:

    $fileName = 'path/to/file.txt';
    $buffer = 'nafu';
    
    if( JFile::write($fileName, $buffer) )
    {
       echo 'File was written';
    }
    

    http://docs.joomla.org/API16:JFile/write

    点赞 评论 复制链接分享

为你推荐