B
Brian
Hello all. I'm coding a site right now, but I don't know Perl or asp
(other than what I've learned in the last few days). I had someone
helping me write some ASP code, but it is in VBscript, unfortunately
my server only accepts PerlScript. I've converted as much of it as I
can, but it still doesn't work. It's a simple script, and I'm
wondering if someone can look it over and tell me what's wrong (most
likely a minor syntax thing). Thanks.
CONCEPT - I want the file ps2.asp to have a table that reads a text
file (ps2.txt) and uses the info in it as variables to display certain
files/info.
ps2.txt example -
grandtheftauto,used,19.95
truecrime,used,22.95
I need it to loop through each line, and display the information in
the table (as written in my code).
HERE IS THE CODE:
<%@language=PerlScript%>
<html>
<head>
<title>Ps2 Games - TEST PAGE</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<center><h1>TEST PAGE FOR gamedeals.ca</h1></center>
<p>
</p>
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
set fso = $Server->CreateObject("Scripting->FileSystemObject")
set greeting = $fso->GetFile(server->MapPath("ps2.txt"))
set ts = $greeting->OpenAsTextStream(ForReading, -2)
my $varText
Do while not ts.AtEndOfStream
$varText = ts->ReadLine
$varText = split($varText,",")
%>
<table>
<tr>
<td><IMG SRC="<%=$varText(0)%>.jpg"></td>
<td><embed src="<%=$varText(0)%>.html"></embed></td>
<td><%=$varText(1)%><br>$<%=$varText(2)%></td>
</tr>
</table>
<%
loop
%>
<p>
</p>
Here is the bottom of the page...
</body>
</html>
Can anyone help me?
(other than what I've learned in the last few days). I had someone
helping me write some ASP code, but it is in VBscript, unfortunately
my server only accepts PerlScript. I've converted as much of it as I
can, but it still doesn't work. It's a simple script, and I'm
wondering if someone can look it over and tell me what's wrong (most
likely a minor syntax thing). Thanks.
CONCEPT - I want the file ps2.asp to have a table that reads a text
file (ps2.txt) and uses the info in it as variables to display certain
files/info.
ps2.txt example -
grandtheftauto,used,19.95
truecrime,used,22.95
I need it to loop through each line, and display the information in
the table (as written in my code).
HERE IS THE CODE:
<%@language=PerlScript%>
<html>
<head>
<title>Ps2 Games - TEST PAGE</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<body>
<center><h1>TEST PAGE FOR gamedeals.ca</h1></center>
<p>
</p>
<%
Const ForReading = 1, ForWriting = 2, ForAppending = 8
set fso = $Server->CreateObject("Scripting->FileSystemObject")
set greeting = $fso->GetFile(server->MapPath("ps2.txt"))
set ts = $greeting->OpenAsTextStream(ForReading, -2)
my $varText
Do while not ts.AtEndOfStream
$varText = ts->ReadLine
$varText = split($varText,",")
%>
<table>
<tr>
<td><IMG SRC="<%=$varText(0)%>.jpg"></td>
<td><embed src="<%=$varText(0)%>.html"></embed></td>
<td><%=$varText(1)%><br>$<%=$varText(2)%></td>
</tr>
</table>
<%
loop
%>
<p>
</p>
Here is the bottom of the page...
</body>
</html>
Can anyone help me?