初学者问题 [英] Beginner Problems
问题描述
对于你们所有人来说,这个问题可能过于简单了,但是我想要自己教给自己,而且我正在全力以赴各种各样的问题。我
有一个简单的html表单,在提交时调用process.asp:
< html>
< head> < / head>
< body>
< form action =" process.asp" method = Post>
< table cellpadding =" 0" CELLSPACING = QUOT; 5英寸align = center>
< tr>
< td width =" 100">< font color ="#1B157F">名称:< ; / font>< / font>< / td>
< td>< input type =" text"名称= QUOT; txtName的" size =" 55">< / td>
< / tr>
< / table>
<输入类型= [提交"命名= [提交" value ="立即提交"
< / form>
< / body>
< / html>
我希望我的process.asp页面显示用户输入的名称,然后
然后发送包含该信息的电子邮件。这是我到目前为止为process.asp页面提供的
:
< html>
< head> < / head>
< body>
<%
Dim strEmail
Dim strName
strName = Request.Form(" txtName")
Response.Write strName
设置MyCDONTSMail = CreateObject( CDONTS.NewMail)
MyCDONTSMail.From =&em; em **** @ yahoo.com"
MyCDONTSMail.To =" em **** @ yahoo.com"
MyCDONTSMail.Subject =" Get-A-Quote Request from &安培; strName
MyCDONTSMail.Body = MyBody
MyCDONTSMail.Send
设置MyCDONTSMail = Nothing
%>
< / body>
< / html>
我不想让它在网络服务器上运行点。我只是想让它在我的计算机上的常规文件夹中运行,我只需要b $ b。我认为这可能是我没有收到任何电子邮件的原因,但是
然后Response.Write也无法正常工作。当我没有添加html
标签时,我收到一条消息,询问我是要保存还是打开
process.asp页面而不是仅仅运行它。
一点帮助?我显然错过了一些东西。 。 。任何建议都会非常感激!
谢谢!
欢乐
>
推荐答案
欢乐,
不,你有一个良好的开端(除了这个事实,你正在使用20世纪90年代
技术...)。但ASP文件必须由Web服务器处理。您可以
可能在您的机器上本地运行。这些
问题的答案是什么:
1.你在运行什么操作系统?
2.你有吗?安装了IIS,你知道吗?
Ray在家里
< si *********** @ yahoo .COM>在消息中写道
news:11 ******************** @ g14g2000cwa.googlegrou ps.com ...
Hi Joy,
No, you''re off to a fine start (aside from the fact that you''re using 1990s
technology...). But ASP files MUST be processed by a Web server. You can
probably run this locally on your machine. What are the answers to these
questions:
1. What operating system are you running?
2. Do you have IIS installed, do you know?
Ray at home
<si***********@yahoo.com> wrote in message
news:11********************@g14g2000cwa.googlegrou ps.com...
我现在不想让它在网络服务器上运行。我只是想让它在我的计算机上的常规文件夹中运行。我认为这可能是我没有收到任何电子邮件的原因,但
然后Response.Write也无法正常工作。当我没有添加html
标签时,我收到一条消息,询问我是要保存还是打开
process.asp页面,而不是仅仅运行它。
一点帮助?我显然错过了一些东西。 。 。任何建议都会非常感激!
I am not trying to get this to run on a webserver at this point. I am
just trying to get it run in a regular folder on my computer. I
thought that might be the reason why I wasn''t receiving any email but
then the Response.Write doesn''t work either. When I don''t add the html
tags I get a message that asks if I want to save or open the
process.asp page instead of just running it.
A little help? I''m obviously missing something . . . any advice would
be greatly appreciated!
谢谢Ray,
我安装了IIS我正在运行Windows XP。但是,
网页不会驻留在我的电脑上。我需要做什么?
欢乐
Thanks Ray,
I do have IIS installed and I am running Windows XP. However, the
webpage will not reside on my computer however. What do I need to do?
Joy
网页〜会不会,但目前没有?没关系。这是正常的。
在默认的IIS设置中,您的主页是对于您的网站应该位于
C:\Inetpub \ www.root。将您的ASP文件放在那里,然后转到
http://localhost/yourpagename.asp进行测试
现在,其他的东西:
CDONTS = NT服务器的CDO。你正在运行Windows XP。它没有
CDONTS。如果您在安装IIS时安装了SMTP服务,那么您将获得CDOSYS
。阅读: http://www.aspfaq.com/show.asp ?id = 2026 取决于您工作时设置的
,实际上可能无法发送电子邮件。
喜欢,如果你'是一个银行出纳员在客户之间玩ASP文件
你开始尝试从你的网站转发电子邮件,它可能不会去。
代替,你可能会收到网络管理员打来的电话询问为什么你的b $ b $机器试图转发邮件。我建议你停止SMTP
服务并通过验证邮件是否放在C:\ Inetpub \ mailroot中来测试你的ASP代码是否成功\\ pickup,如果事实证明你无法从你的机器传递
邮件。
Ray在家里
< si *********** @ yahoo.com>在消息中写道
news:11 ********************** @ z14g2000cwz.googlegr oups.com ...
The web page ~will~ not but currently does? That''s fine. That''s normal.
In a default IIS setup, your "home page" for your site should reside in
C:\Inetpub\wwwroot. Put your ASP files there and test them by going to
http://localhost/yourpagename.asp
NOW, other things:
CDONTS = CDO for NT Server. You''re running Windows XP. It does not have
CDONTS. If you installed the SMTP service when you installed IIS, you''ll
have CDOSYS. Read this: http://www.aspfaq.com/show.asp?id=2026 Depending
on your setup where you''re working, the e-mails may not actually be sent.
Like, if you''re a bank teller playing with ASP files in between customers
and you start trying to relay e-mail from your site, it probably won''t go.
Instead, you may wind up getting a call from a network admin asking why your
machine is trying to relay mail. I suggest that you just stop the SMTP
service and test the success of your ASP code by verifying that the mail was
placed in C:\Inetpub\mailroot\pickup, if it turns out that you cannot relay
mail from your machine.
Ray at home
<si***********@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
谢谢Ray,
我安装了IIS,运行的是Windows XP。但是,
网页不会驻留在我的电脑上。我需要做什么?
Joy
Thanks Ray,
I do have IIS installed and I am running Windows XP. However, the
webpage will not reside on my computer however. What do I need to do?
Joy
这篇关于初学者问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!