I have tried the script below as a test and named it test.wml
............... ...........
<?php
/* Some not needed php vars for example */
$page_name ='Test';
$page = '<p>This is the page content</p>';
/* Header stuff */
header('Content-Type: text/vnd.wap.wml', true);
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
print "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
/* Exit PHP and print out wml doc
save as *.php
*/
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.or g/DTD/wml_1.1.xml">
<wml>
<card id="Page<?php echo $page_name; ?>" title="<?php echo $page_name;
?>">
<p>
<strong><?php echo $page_name; ?></strong>
</p>
<?php
echo $page;
?>
<p><br />
<anchor>Home
<go href="/" />
</anchor>
<do type="prev" label="Back"><p rev/></do>
</p>
</card>
</wml>
............... ............... ............... .......
I have used the following in a .htaccess file
............... ............... ............... ...........
# For PHP 4.x :
AddType application/x-httpd-php .wml
............... ............... ............... ............
The .htaccess is doing something because I have no success without it.
I am using the openwave 6.2.2 SDK viewer/emulator to test the script
along with a Nokia 7210
These are the results:
1. Using my own local server - Script OK on Openwave.
2. Using my Net webspace - Openwave reports an error, for all three of
the PHP header command lines,
'Headers already sent' - If I remove the PHP header commands it works
perfectly.
3. Tried the script from my Net web site on the Nokia 7210 - headers
included or not the 7210 reports
'unknown format' and doesn't attempt to do anything.
So what is going wrong and how can I solve this problem?
Remove 'no_spam_' from email address.
............... ...........
<?php
/* Some not needed php vars for example */
$page_name ='Test';
$page = '<p>This is the page content</p>';
/* Header stuff */
header('Content-Type: text/vnd.wap.wml', true);
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
print "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
/* Exit PHP and print out wml doc
save as *.php
*/
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.or g/DTD/wml_1.1.xml">
<wml>
<card id="Page<?php echo $page_name; ?>" title="<?php echo $page_name;
?>">
<p>
<strong><?php echo $page_name; ?></strong>
</p>
<?php
echo $page;
?>
<p><br />
<anchor>Home
<go href="/" />
</anchor>
<do type="prev" label="Back"><p rev/></do>
</p>
</card>
</wml>
............... ............... ............... .......
I have used the following in a .htaccess file
............... ............... ............... ...........
# For PHP 4.x :
AddType application/x-httpd-php .wml
............... ............... ............... ............
The .htaccess is doing something because I have no success without it.
I am using the openwave 6.2.2 SDK viewer/emulator to test the script
along with a Nokia 7210
These are the results:
1. Using my own local server - Script OK on Openwave.
2. Using my Net webspace - Openwave reports an error, for all three of
the PHP header command lines,
'Headers already sent' - If I remove the PHP header commands it works
perfectly.
3. Tried the script from my Net web site on the Nokia 7210 - headers
included or not the 7210 reports
'unknown format' and doesn't attempt to do anything.
So what is going wrong and how can I solve this problem?
Remove 'no_spam_' from email address.
Comment