 |
 |
 |
Please can anyone advise on how to use PHP to print an image for WAP.
I can get print to work with .jpgs on a www. page or through a mobile
phone browser (transitional doctype) :
<h4>Picture of the day:</h4>
<?php
$image_path = "../images/mobile";
$images =
array('image_sun.jpg','image_mon.jpg','image_tue.jpg','image_wed.jpg','image_thu.jpg','image_fri.jpg','image_sat.jpg');
$day_of_week = date("w");
print("<img src=\"$image_path/$images[$day_of_week]\" alt=\"pic of the
day\" />");
?>
The following does not work (all other aspects apart from the images
work):
<?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 title="....." id="tuesday">
<?php
// printing picture of the week with an array
$image_path = "../images/mobile";
$images =
array('sunday.wbmp','monday.wbmp','tuesday.wbmp','wednesday.wbmp','thursday.wbmp','friday.wbmp','saturday.wbmp');
$day_of_week = date("w");
print("<img src=\"$image_path/$images[$day_of_week]\" alt=\"day of the
week\" />");
?>
</p>
......
<a href="wap.php">Back: Home</a></p>
</card>
</wml>
thanks!
http://www.ekstasis.net/
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |