Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2006, 09:21 AM
Authorized User
 
Join Date: Aug 2005
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Calverstine Send a message via MSN to Calverstine
Default PHP WAP issue

hello everyone,

Good morning to all the high tech. person out there. Recently, small student is trying to implement WAP language using APACHE PHP MYSQL, WAP, in Windows XP system SP2. The WAP browser I installed on Windows is: KLONDITE WAP BROWSER 1.5 PE edition.

I configure the .htaccess file to add file type for apache to recommend the .WML file extension, which is in a file called a.htaccess, and their substance are:

#hash is a comment used to describe function in .htaccess
#this .htaccess file will be used to configure the apache to read .wml files
#there is 2 method that is used to configure apache to read the .wml files
#one is through httpd.conf, and another is through .htaccess files
#Reference of information take was from: http://www.zend.com/zend/tut/wap.php#Heading9

# MIME Types for WAP

# For PHP 4.x, use this:
AddType application/x-httpd-php .wml

# 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

Then what I wrote:::

<?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>
<?php

    $the_date = date("Y-m-d";
    print $the_date;
    print "<br/>Welcome to a PHP-enabled site!";
?>
</card>
</wml>


The startup process is fine, but when I compile it, it has something like an error, that couldn't read PHP syntax, can anybody help?? The screen display is some how like this:::

Welcome to a PHP-enabled site!"; ?>

 found that It couldn't detect PHP language syntax, was it the wrong with browser compatibility?

I even try to configure the server to recognize by throwing the htaccess file and copy the content into the httpd.conf file like this

[::The last few line::]

ScriptAlias /php/ "c:/PHP/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"


#my WAP
AddType application/x-httpd-php .wml


AddType application/x-httpd-php3 .wml


AddType text/vnd.wap.wml .wml


AddType image/vnd.wap.wbmp .wbmp

Anybody could help me, it's interesting la, hahahaha hope somebody tech savvy could show up helping me..






Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript + PHP Issue MooMan65 Beginning PHP 3 June 25th, 2007 05:34 AM
php setup issue a1m1m25 Beginning PHP 3 March 27th, 2005 01:10 PM
PHP issue from start. jimmychuck BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 September 12th, 2004 04:31 PM
PHP/Design issue wolftrap1 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 February 4th, 2004 09:53 PM
php/sql connection issue m3rajk PHP Databases 2 August 19th, 2003 08:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.