Use PHP to create a DOC file on a Unix Box based on an HTML webform selection(使用 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:
- 在 Linux 中使用 PHP 创建 Word 文档
- 在 PHP 中读/写 MS Word 文件
这篇关于使用 PHP 在基于 HTML 网络表单选择的 Unix Box 上创建 DOC 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 PHP 在基于 HTML 网络表单选择的 Unix Box 上创建 DOC 文件


- 如何从数据库中获取数据以在 laravel 中查看页面? 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- PHP - if 语句中的倒序 2021-01-01
- 覆盖 Magento 社区模块控制器的问题 2022-01-01
- openssl_digest vs hash vs hash_hmac?盐与盐的区别HMAC? 2022-01-01
- 如何使用 Google API 在团队云端硬盘中创建文件夹? 2022-01-01
- 使用 GD 和 libjpeg 支持编译 PHP 2022-01-01
- PHP foreach() 与数组中的数组? 2022-01-01
- 如何在 Symfony2 中正确使用 webSockets 2021-01-01
- Laravel 5:Model.php 中的 MassAssignmentException 2021-01-01