| | |
WAP+php
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
hi
i am trying to develop a site.i am using php and wml.this is my first program.can any one say why my below code is not woking
i am trying to develop a site.i am using php and wml.this is my first program.can any one say why my below code is not woking
PHP Syntax (Toggle Plain Text)
<?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> <? require_once('./common/dblayer1.php'); $query = "select * from login"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { echo $row[0]; } ?> </card> </wml>
xml Syntax (Toggle Plain Text)
<?xml version="1.0" ?>
php Syntax (Toggle Plain Text)
<?php 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> <?php /* declare script type short tags may be off other script languages may be available saves debugging later*/ require_once('./common/dblayer1.php'); $query = "select * from login"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { echo $row[0]; } ?> </card> </wml>
php Syntax (Toggle Plain Text)
<?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> <? require_once('./common/dblayer1.php'); $query = "select * from login"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { echo $row[0]; } ?> </card> </wml>
Last edited by peter_budo; Jan 9th, 2009 at 6:15 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
php Syntax (Toggle Plain Text)
<?xml version=\"1.0\" ?> <!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1 EN "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card> <?php require_once('./common/dblayer1.php'); $query = "select * from login"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { echo $row[0]; } ?> </card></wml>
maybe
Last edited by peter_budo; Jan 9th, 2009 at 6:16 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Failure is not an option It's included free
If at first you dont succeed, join the club
Please mark solved problems, solved
If at first you dont succeed, join the club
Please mark solved problems, solved
Line 1: String not started expecting ' or "
Line 1: Malformed declaration expecting version
Line 1: Blank needed here
Line 1: parsing XML declaration: '?>' expected
Line 2: SystemLiteral " or ' expected
Line 2: PUBLIC, the Public Identifier is missing
Line 2: Space required after the Public Identifier
Line 2: SystemLiteral " or ' expected
Line 2: SYSTEM or PUBLIC, the URI is missing
Line 2: DOCTYPE improperly terminated
Line 2: Start tag expected, '<' not found
these are the errors.i am WAP proof to execute my code.plz do tell me whether i right
Line 1: Malformed declaration expecting version
Line 1: Blank needed here
Line 1: parsing XML declaration: '?>' expected
Line 2: SystemLiteral " or ' expected
Line 2: PUBLIC, the Public Identifier is missing
Line 2: Space required after the Public Identifier
Line 2: SystemLiteral " or ' expected
Line 2: SYSTEM or PUBLIC, the URI is missing
Line 2: DOCTYPE improperly terminated
Line 2: Start tag expected, '<' not found
these are the errors.i am WAP proof to execute my code.plz do tell me whether i right
You probably have short open tags enabled in the PHP config. So it would see the xml declaration as an opening PHP tag.
In PHP.ini disable short open tags by finding "short_open_tag" and making the value "0".
You can also seperate the < and ? in <?xml so it doesn't look like a PHP open tag (<?).
eg:
notice that you have "<"."?xml instead of "<?xml.
You can also remove the xml declaration, and use the HTTP content-type header.
In PHP.ini disable short open tags by finding "short_open_tag" and making the value "0".
You can also seperate the < and ? in <?xml so it doesn't look like a PHP open tag (<?).
eg:
PHP Syntax (Toggle Plain Text)
<?php echo "<"."?xml version=\"1.0\" ?>";
notice that you have "<"."?xml instead of "<?xml.
You can also remove the xml declaration, and use the HTTP content-type header.
PHP Syntax (Toggle Plain Text)
<?php header('Content-Type: text/xml');
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
![]() |
Similar Threads
- Resume : c#.net,java,php (Post your Resume)
- Image Scrolling using PHP (PHP)
- how to display image in wml page using php (PHP)
- online music application (PHP)
- Wap site and php site (IT Professionals' Lounge)
- WAP and PHP (PHP)
- Wap development with PHP (PHP)
Other Threads in the PHP Forum
- Previous Thread: preg_replace Help
- Next Thread: PHP Feedback Form
| Thread Tools | Search this Thread |
# .htaccess 5.2.10 access alexa apache api array beginner broken cakephp checkbox class clean clients cms code convert cron curl database date directory display dissertation dropdown dynamic echo$_get[x]changingitintovariable... email encode error fairness file folder form forms function functions google hack href htaccess html htmlspecialchars image include indentedsubcategory ip javascript joomla legislation limit link local login mail memberships menu methods multiple multipletables mysql mysqlquery network newsletters oop open passwords paypal pdf persist php provider query radio random redirect remote script search secure server sessions simple sockets source space spam sql system table tutorial upload url user variable video voteup web youtube






