【问题标题】:How to save an XML file on server with Haxe PHP?如何使用 Haxe PHP 在服务器上保存 XML 文件?
【发布时间】:2009-12-14 10:28:39
【问题描述】:

我刚开始进行 Haxe 开发,想尝试一下 PHP 方面,但已经有点困惑了。

在使用 Haxe 编译为 PHP 的服务器上的文件夹中将一些表单数据保存到 XML 文件的最佳方法是什么?

【问题讨论】:

    标签: php haxe


    【解决方案1】:

    你可以通过两种方式做到这一点。 用haxe制作网站表格,包括:

    在服务器上为项目制作适当的 .htaccess 文件,

    编写一个接收请求的 Main 类(htaccess 将指向该类), 并返回表单 html 文档或从表单中获取数据...

    然后将该数据转换为 xml 格式, 最后将这些数据放入一个文件中。

    以下是您应该查看的 Api 文件:

    File methods for writting to a file

    Web class that will get request data and fire up proper class and function, getURI, getMethod, getParams

    Template class for generating simple html / very simple

    Depending on complexity of xml you may want to use a specialized class

    和第二种方式差不多,不过你只编译成一个文件。 在您的 html 表单中,您将操作链接放在编译后的 php 文件中...

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-21
      • 2018-10-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多