佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 876|回复: 4

PHP WAP issue

[复制链接]
发表于 10-9-2006 12:06 PM | 显示全部楼层 |阅读模式
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!";  ?>

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

回复

使用道具 举报


ADVERTISEMENT

发表于 11-9-2006 01:12 AM | 显示全部楼层
to test is your php in apache working or not, use phpinfo(); in normal .php file running by IE, then try running at KLONDITE. at last change .php to .wml and try running at KLONDITE
回复

使用道具 举报

 楼主| 发表于 11-9-2006 06:56 PM | 显示全部楼层
原帖由 8years 于 11-9-2006 01:12 AM 发表
to test is your php in apache working or not, use phpinfo(); in normal .php file running by IE, then try running at KLONDITE. at last change .php to .wml and try ....

hi ,

My php is working, the issue is with running PHP on WML, and basically on mobile browser I don't think it will run php, if you installed Apache and run the mobile browser - for e.g. KLONDITE / Win Wap for Windows, it will show you bunch of errors

in mozilla or other standard browser the screen are ok like below: running http://localhost

If you use mobile browser such as winwap for windows it will look like this: running http://localhost

If you intend to run php_info(); it will look something like this, i think there's some concern on the content typpe header:

(in this case the winwap browser will ask you whether to open the file using default browser yes/ no
if you choose yes mozilla will open(my default browser, if you choose no, it willa ask you to save changes, otherwise you click on cancel it will show you this)



Anybody can help me???  Getting crazy of this already
回复

使用道具 举报

 楼主| 发表于 15-9-2006 09:01 PM | 显示全部楼层
anybody able to help me bo??
回复

使用道具 举报

发表于 18-9-2006 01:13 AM | 显示全部楼层
seens like wap explorer doesnt support some html code, maybe you need to read more detail about wap explorer. see what language wap explorer can parse.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 12-11-2024 07:45 AM , Processed in 0.104815 second(s), 23 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表