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..