无法从perl CGI写入文本文件 [英] Cannot write from perl CGI to text file

查看:86
本文介绍了无法从perl CGI写入文本文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我是perl和这个论坛的新手。我正在尝试设置邮件列表订阅功能,以便客户收到我的定期简报。我的perl程序抓取了html表单的电子邮件地址文本输入,但是我在将这些数据写入纯文本文件时遇到了问题。


下面是我的html表单,后跟我的perl脚本。当我在IIS上运行它时,我没有收到任何错误,也没有任何东西写入该文件。非常感激任何的帮助。 :)

email.html

Hi all,

I am new to perl and this forum. I am trying to setup a mailing list subscription functionality for customers to receive a periodic newsletter from me. My perl program grabs the html form ''email address'' text input but I am then having issues writing this data to a plain text file.

Below is my html form followed by my perl script. When i run this on IIS, i dont receive any errors, nor does anything get written to the file. Any help would be most appreciated. :)

email.html

展开 | 选择 | Wrap | 行号

推荐答案



尝试使用这个简单的代码,

绝对可以使用4 u,


try with this simple code,
definitely it will work 4 u,

展开 | 选择 | Wrap | 行号


您已将代码发布到论坛中而未使用正确的代码标记。这是TSDN上的最佳实践,用于将所有代码发布到代码标记中的论坛中。


代码标签以[code]开头,以[/ code]结束。如果您需要除此之外的其他示例,请参阅右侧的 REPLY GUIDELINES (或发布指南,如果您正在开始讨论)消息窗口。您可以在那里找到发布的示例和建议。


此外,您还可以将语言添加到代码标记中。这是一个例子:


[code = perl]

< some code>


[/ code ]


请注意我已修复您上面的帖子以包含正确的代码标签。请确保在TSDN上的所有未来帖子中使用代码标签。

这适用于您,因为您都没有使用过标签!!


- 主持人
You have posted code into the forum without using proper code tags. It is best practice here on TSDN to wrap all code posted into the forum in code tags.

Code tags start with [code] and end with [/code]. If you need an example other than this one, the please refer to the REPLY GUIDELINES (or POSTING GUIDELINES if you are starting a discussion) to the right of the Message window. You will find the examples and suggestions for posting there.

In addition, you can also add the language to your code tags. Here is an example:

[code=perl]
<some code>

[/code]

Please know that I have fixed your posts above to include the proper code tags. Please be sure and use code tags in all of your future posts here on TSDN.

This applies to BOTH of you as neither of you used the tags!!

- Moderator


感谢您的快速回复!!不幸的是,这仍然没有奏效。 :(我跑了,输入了一个电子邮件地址,一个空白页面显示状态''完成''。仍然没有写入文件。


所以我的.htm表格有一个输入和提交的电子邮件地址,输出是一个空白页面。不知道这里有什么。其他建议吗?


我正在运行ActivePerl-5.8.8.820-MSWin32-x86在带有IIS 6的Windows 2003上的-274739.msi。不知道这是否有帮助。


也是什么,html 4严格?我需要在这里更改任何内容吗?


欢呼,


Mick
thanks for your quick response!! unfortunately, this still did not work. :( i ran it, entered an email address and a blank page came up with the status ''done''. still no write was made to the file.

so my .htm form has an email address entered and submitted and the output is a blank page. not sure what is up here. any other suggestions?

im running ActivePerl-5.8.8.820-MSWin32-x86-274739.msi on windows 2003 with IIS 6. dont know if this helps at all.

also, what is html 4 strict? do i need to change anything here?

cheers,

Mick


这篇关于无法从perl CGI写入文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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