|
-
Nov 24th, 2000, 05:18 AM
#1
Thread Starter
New Member
Hi does any one of u know how i can make a news form?
i want to make a page when u get there the page will look at a file (news.txt) and show that on the website.
how do i make this?
grtz
thatsmej
-
Nov 24th, 2000, 06:55 AM
#2
Frenzied Member
using asp?
whose server is it?
if it's someone elses server then "Scripting.FileSystemObject" might not be available but tit should be ok for pws on your own pc
Code:
<%@ Language=VBScript %>
<%option explicit%>
<HTML>
<BODY>
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim Visitor, fso, f,myText
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(Server.MapPath("\news.txt"), ForReading, True)
Do While not f.AtEndOfStream
myText = myText & f.ReadLine & "<BR>"
Loop
f.Close
Response.Write(myText)
%>
</BODY>
</HTML>
-
Nov 24th, 2000, 07:38 AM
#3
Frenzied Member
what sort of effect are you trying to achieve?
I presume that using an <iframe> wouldn't suffice.
[Edited by Mark Sreeves on 11-27-2000 at 04:03 AM]
-
Nov 24th, 2000, 12:11 PM
#4
Thread Starter
New Member
this
i want to make something for school that teachers on my school can update the lessons that we are free.
Whitout knowing something about html.
sorry for my english.
grtz
thatsmej
-
Nov 27th, 2000, 03:27 PM
#5
Thread Starter
New Member
help again
so this would be the code?
<%@ Language=VBScript %>
<%option explicit%>
<HTML>
<BODY>
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim Visitor, fso, f,myText
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(Server.MapPath("\news.txt"), ForReading, True)
Do While not f.AtEndOfStream
myText = myText & f.ReadLine & "<BR>"
Loop
f.Close
Response.Write(myText)
%>
</BODY>
</HTML>
i probebly need to call the procedure to start it.
because it won`t work now.
can someone please tell me how i should do it?
grtz
thatsmej
-
Nov 28th, 2000, 03:12 AM
#6
Frenzied Member
what is being output to the browser?
-
Nov 28th, 2000, 04:23 AM
#7
Thread Starter
New Member
think i know
hi,
i think i know what`s my problem.
i need to save the code as a news.asp file. and than call the asp file whitin the site.
something like
<FORM ACTION="news.asp" METHOD="GET">
but this won`t work.
can someone tell me what i do wrong??
or give some advise in starting whit asp?
thnx
grtz thatsmej
-
Nov 28th, 2000, 04:57 AM
#8
Frenzied Member
OK lets start at the begining...
ASP files contain script which is executed on the server that is anything between the <% %> tags
you need to have (at least) Personal Web Server installed on your PC have you done this?
the page is then accessed throuth the browser
http://[PC-Name]/whatever.asp
-
Nov 28th, 2000, 12:06 PM
#9
Thread Starter
New Member
No
No i didn`t.
where can i find that program?
en how do i know if a ISP has it?
grtz
thatsmej
-
Nov 29th, 2000, 03:48 AM
#10
Frenzied Member
Right,
there are sites which will host Active Server Pages I use http://www.ewebcity.com (now called somthing else but you'll be redirected)
Personal Web Server is on NT4 Option Pack , well that's where I got it from anyway.
I believe it is also on the Win 98 cd but I've never installed it on 98 so I suggest you start a new thread asking this.
-
Nov 29th, 2000, 04:12 AM
#11
Lively Member
Yes - it is on the 98 CD, in the Add-ons folder. I am running it on 98.
-
Dec 3rd, 2000, 12:58 PM
#12
Thread Starter
New Member
got it
oke i`ve got it right now
whats next?
thatsmej
-
Dec 4th, 2000, 03:19 AM
#13
Frenzied Member
when you type http://localhost in a browser you sghould get a default page appear
If I remember rightly this is a page in C:\Inetpub\wwwroot on your hard drive. (I think that's where the default page is stored)
anyone else on your network will need to use your pc name instead of localhost to access the pages.
so, put your asp pages in C:\Inetpub\wwwroot and navigate to them eg:
http://localhost/page1.asp
-
Dec 4th, 2000, 12:51 PM
#14
Thread Starter
New Member
nope
nope,
when i do that my frontpage 2000 comes up
:-(
grtz
thatsmej
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|