|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
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
|
|||
|
|||
|
WML - PHP program display problem, help please
i am new to wml. i have created on wml whcih contain PHP code inside it. when i run it in emulator only wml part is diplaying. PHP part is not displaying ....
can any one tell me what is the problem? |
|
#2
|
||||
|
||||
|
Hi, welcome to Dev Shed.
You will need to give a bit more information. Such as: Does your page have a .php extension or are you making .wml parse as PHP? What content-type headers are you sending to the browser/emulator? Can you show your relevant code?
__________________
Cheers, Jamie # skiFFie | Home of the 'accessibility module' for Drupal # Jamie Burns [me] Accessibility Module [drupal] # guidelines | search | wap resources | not getting help | fold to cure # Any form of employment is strictly prohibited ...... __________________ Let the might of your compassion arise to bring a quick end to the flowing stream of the blood and tears ..... Please hear my anguished words of truth. __________________ |
|
#3
|
|||
|
|||
|
Quote:
thanks for the reply.... I am saving with .wml extension and parse as PHP. Code is as follows: 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">";
?>
<wml>
<card id="card1" title="Hello World!">
<p>
<p>
Welcome...
</p>
<?php
echo "hello";
$the_date = date("M d Y");
echo $the_date;
echo "<br/>Welcome to a PHP-enabled site!";
?>
<p>
after date
</p>
</p>
</card>
</wml>
I don't know whether it is correct ot not. If any thing is wrong please help me and please tell how to check the out in web browser and in emulator.. thanks in advance... |
|
#4
|
|||||
|
|||||
|
Your code is incorrect. You haven't escaped the "quotes" properly -
best using 'single quotes' IMHO. You have a tag-soup too. Incorrectly nested <p>paragraphs</p> You can get a firefox extension to check in a web browser. Opera allows you to view wml pages too.. php Code:
|
|
#5
|
||||||
|
||||||
|
Quote:
Hi , still i am getting the same result in emulator such as Welcome... after date. can you help to see the output with the date displaying between welcome and after date. if i check the out in opera i am getting the error as ML parsing failed: syntax error (Line: 4, Character: 27) Reparse document as HTML Error:unexpected text (non-whitespace text outside root element) Specification )1: <?php 2: // send wml headers 3: header("Content-type: text/vnd.wap.wml"); 4: echo "<?xml version="1.0"?>"; 5: echo "<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"" 6: . " "">"; 7: ?> 8: <wml> please help me .... thanks in advance..... |
|
#6
|
||||
|
||||
|
Copy and paste the code I provided you!!
You have the same errors as the original snippet you posted. Are you sure that the page is being parsed as php?? |
|
#7
|
|||
|
|||
|
Quote:
Hi, Sorry for the late reply... when i save the file as .php it is working fine in emulator but when i save as .wml it is not displaying the PHP part. all these result is observed in wamp5 server. can u give me any suggestion? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > WML - PHP program display problem, help please |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|