WAP and PHP (for gravity or other)

I'm trying to develop WAP applications with PHP.

Does anyone have any ideas about how to configure the
Apache Web Server in order to use WML and PHP.
I've tried some configuration but it doesn't seem to work.

Besides, in all wml pages I have  <?xml version="1.0"?>. PHP doesn't like...:)
LVL 8
us111Asked:
Who is Participating?
 
gravityConnect With a Mentor Commented:
Hey Dude,

I have this header at the top of all my WAP documents :

<?
        header("Content-type: text/vnd.wap.wml");
        echo '<?xml version="1.0"?>';
        echo "\n";
        echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
        echo "<wml>\n";
?>
0
 
chkassenCommented:
Hi us111

first you should check that you have enabled long tags "<?php" otherwise php will not work.

The next thing you should check to do is print out the right content-type with
 <?php header("Content-Type: text/vnd.wap.wml; charset=iso-8859-1"); ?>

Hope this helps

--
chkassen
0
 
gravityCommented:
BTW chkassen, you're wrong. PHP will work with :

<? ?>
<?php ?>
<script language="php">
</script>

There are probably more but they all work...
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
us111Author Commented:
Thanks!
I will check next tuesday. Long week-end.
0
 
chkassenCommented:
Yes gravity you're right it works the way you wrote but when you have XML files it doesn't.

--
chkassen
0
 
gravityCommented:
us111 : A word of advice - don't use method="post" for any form or link - on Nokia's own gateways it tends to disagree with the phones...

chkassen : Fair point, I wasn't thinking XML :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.