使用 PHP 在基于 HTML 网络表单选择的 Unix Box 上创建 DOC 文件 [英] Use PHP to create a DOC file on a Unix Box based on an HTML webform selection

查看:28
本文介绍了使用 PHP 在基于 HTML 网络表单选择的 Unix Box 上创建 DOC 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 HTML 文件,其中包含一个包含多个问题的网络表单,这些问题的回答是是"/否".

I have an HTML file which contains a webform with multiple questions which have a YES / NO responses.

如果问题的答案是是",我希望将预定义的(每个问题)文本部分写入服务器上的 DOC 文件,但仅在按下提交按钮后(这样,如果用户改变主意并将答案形式从是"更改为否",我不必重新编写文档).

If the question has a YES answer, I would like a predefined ( per question ) section of text to be written to a DOC file on the server, but only AFTER the submit button has been pressed ( this way, if the user changes their mind and changes an answer form YES to NO, I won't have to re-write the doc ).

当用户点击提交后,文件应显示为下载.

When the user has clicked Submit, The file should be presented as a download.

任何想法

推荐答案

你只需要像这样将你的 html 表单链接到一些脚本(php、jsp、...)

you only have to link your html form to some script (php, jsp, ...) like this

<form action="/myscript.php" method="post">
   YOUR FORM
   <input type="submit" value="Send Form">
</form>

然后脚本完成整个工作...这里有一些 php 示例:

Then script does the whole work...here are some examples for php:

这篇关于使用 PHP 在基于 HTML 网络表单选择的 Unix Box 上创建 DOC 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆