Esato

Forum > Sony Ericsson / Sony > General > wap with cgi/perl files

Author wap with cgi/perl files
solem
P800
Joined: Jan 26, 2002
Posts: 74
From: Norway
PM
Posted: 2002-06-03 19:40
Reply with quoteEdit/Delete This PostPrint this post
Seems like it was a html "tag"-problem in the last post... Here it is again!

I'm developing a wap page which contains a cgi-script, but I'm having trouble launching the page with a T68. All other emulators work great! It seems like the T68 is very conservative with the syntax. So, anybody know which format to use when writing a perl file for a wap-browser? My script are as follows:

#!/usr/bin/perl

print "Content-Type: text/vnd.wap.wml\n\n";
print "<?xml version=\"1.0\"?>";
print "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \n";
print "\"http://www.wapforum.org/DTD/wml_1.1.xml\">";
print "<wml>";
print "<card id\=\"cardtitle\" title\=pagetitle>";
print "<p align\=\"left\">";

<script functions>
.
.
.

print "<\/p>";
print "<\/card>";
print "<\/wml>";
oskar
T610
Joined: Mar 18, 2002
Posts: 173
From:
PM
Posted: 2002-06-03 19:43
Reply with quoteEdit/Delete This PostPrint this post
it's been some time since i used perl, but i don't think this i right..
print "<\/p>";
think it should be:
print "</p>";

also the "\=" in this line are not needed: (i think)
print "<card id\=\"cardtitle\" title\=pagetitle>";
should be:
print "<card id=\"cardtitle\" title=\"pagetitle\">";
_________________
/Oskar


[ This Message was edited by: oskar on 2002-06-03 18:48 ]
ebosrup
T610
Joined: Jan 12, 2002
Posts: 18
PM
Posted: 2002-06-03 21:03
Reply with quoteEdit/Delete This PostPrint this post
It might be the linebreak inside the doctype.
solem
P800
Joined: Jan 26, 2002
Posts: 74
From: Norway
PM
Posted: 2002-06-03 22:42
Reply with quoteEdit/Delete This PostPrint this post
I've found the error, it was a combination of to many escape characters in header and ampersand (&) in url location (which is a reserved character, had to write &amp; instead).
Access the forum with a mobile phone via esato.mobi