|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
how to config web server to support wml+php
hi there,
i'm trying to combine php with wml pages. so far it didnt work at all. here's a simple code i tried: <?php 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\">"; ?> <wml> <card id="card1"> <?php print "hello world";?> </p> </card> </wml> i tried numerous versions and multiple codes from many sources so if this code is bugged ignore it .what i need to know is what configuration are needed for my web server.i'm running "abyss-x" web server on my machine. thanks |
|
#2
|
||||
|
||||
|
.htaccess
you need to tell the server to accept wml pages, this can often be done in your control panel like cpanel or in your .htaccess file if either are supported.
there's more on the mime types you need including for a fully featured WAP site in this thread but a quick example from of one of the .htaccess files i use if this: AddType text/vnd.wap.wml wml hope this helps, let us know how you get on with it, good luck
__________________
Andy Moore << oh no it's got a blog..... Word Press WAP Plugin with Ad Mob Advertising revenue PHP developer deploying ringtones, mp3 downloads and realtones I'm a geek who's obsessed with stats and gadgets |
|
#3
|
|||
|
|||
|
thanks but it still doesn't work
Quote:
I already added all the mime types that should support a simple wml ,php enabled, page. i also have these mimes : application/x-httpd-php3 wml application/x-httpd-php wml so....i don't know what else i can do |
|
#4
|
|||
|
|||
|
Hi guys.
I think I'm having the same MIME type problem with wml extension. I'm using easyphp on winxp profesional. I already have added all the MIME type I could find on internet, but anytime I use a browser to check a php based wml. I got a message that browser didnt recognized the file. I have a versión on Jsp, here the wml works good on browsers. What can I do ???. what do you think guys, is better to work with php than jsp? Luis Arturo Ecuador. |
|
#5
|
|||
|
|||
|
Hi,
The mime type is not the problem here - you have correctly set the content-type at the top of your php file using the header command. The mime type only applies to static wml pages using the .wml extension. Unlike most HTML browsers, WML browsers are less forgiving and require documents to be well formed and validate to the doctype they specify. In your example, you have an ending paragraph tag (</p>) but no start tag. All you have to do to make this work (unless I've overlooked any other mistakes) is add an opening paragraph tag (<p>) before your php hello world write. Let me know if you have any further problems. Cheers, John Levermore http://www.johnlevermore.com/ |
|
#6
|
||||
|
||||
|
The code is not valid:
<?php 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\">"; ?> <wml> <card id="card1"> <p><?php print "hello world";?> </p> </card> </wml> Try it now |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > how to config web server to support wml+php |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|