|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi there,
Just wondering if anyone could enlighten me on a couple of things? Basically I just want to know can you integrate PHP and WML? If so how? I tried a bit of PHP and it told me it was HTML. It seems the browser doesnt like the PHP extension. Tried a known good page with .php extension and it ****ed up too. And I dont think it processes the php if you give it the wml extension (or am I wrong there?). Basically I'm tearing my hair out! Any ideas guys (and gals)? Cheers, Ryan |
|
#2
|
|||
|
|||
|
Havent worked with PHP, but if it is more or less the same as ASP, JSP or Cold Fusion, I suppose you would be required to place some line like the following:
ASP <%Response.ContentType = "text/wnd.wap.wml"%> JSP <%response.setContentType("text/vnd.wap.wml");%> Cold Fusion <CFCONTENT type="text/vnd.wap.wml"> I guess there is an equivalent of that in PHP that you ight be missing out on?!?!? And then again maybe not?!? Preetham |
|
#3
|
||||
|
||||
|
It's not a problem. For an example, have a look at "Phonelist" in the clipscripts section here. I have found that it's more of a problem testing the stuff rather than writing it. I'll be posting another example soon, so watch this space.
|
|
#4
|
|||
|
|||
|
The following code snippet is for PHP:
header("Content-type: text/vnd.wap.wmlnn"); |
|
#5
|
|||
|
|||
|
Hi there,
You can do it, but it requires some playing around with your Apache httpd.conf file. Add the following to serve wap enabled pages(That also use php): # MIME Types for WAP # For PHP 4.x, use this: AddType application/x-httpd-php .wml # This parses php scripts within a .wml page # For PHP 3.x, use this: AddType application/x-httpd-php3 .wml # For normal WML pages. AddType text/vnd.wap.wml .wml # For WML embedded graphics. AddType image/vnd.wap.wbmp .wbmp # End MIME Types for WAP At the top of all your pages write this php code: <?php // send wml headers header("Content-type: text/vnd.wap.wml"); echo "<?xml version="1.0"?>"; echo "<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"" . " "http://www.wapforum.org/DTD/wml_1.1.xml">"; ?> Here is a code example using php: <wml> <card id="card1" title="Hello World!"> <p> <?php // format and output date $the_date = date("M d Y"); print $the_date; print "<br/>Welcome to a PHP-enabled site!"; ?> </p> </card> </wml> Hope this helps! |
|
#6
|
|||
|
|||
|
Building WML Applications Using PHP :
------------------------------------------------- http://www.zend.com/zend/tut/wap.php WAP-Enabling a Website with PHP3 : ------------------------------------------------- http://www.devshed.com/Server_Side/PHP/PHP_WAP/ WAP In Perspective : ------------------------------------------------- http://phpbuilder.com/columns/markaw20001204.php3 |
|
#7
|
|||
|
|||
|
Another php/wml tutorial has been born, it lives here :
Introduction to WML, Apache, and PHP : http://phpbuilder.com/columns/mike20010118.php3 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > WML and PHP combined.. possible? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|