10-02-2011 08:41 AM
I am PHP developer for basic web pages, I am testing jquery mobile libraries with PHP ... works fine on ipad, iphone, & droid ..... of course my customer has a Blackberry 5 .... I have narrowed the problem down to a couple of lines of code.
THIS CODE WORKS:
<?php include("header.inc"); ?>
<div data-role="header"><h1>Mark's Page</h1><a href="index.php" data-icon="home" rel="external" data-ajax="false">Home</a></div>
<div data-role="content">
<?
echo "<h1>Mark's Favorite Music</h1>";
echo "<ul data-role='listview' data-inset='true' data-filter='true'>";
echo "<li>The Beatles</li>";
echo "<li>Lady Gaga </li>";
echo "<li>Osmond Brothers</li>";
echo "<li>Spice Girls</li>";
echo "</ul>";
?>
</div>
<?php include("footer.inc"); ?>
This code is NOT WORKING on the Blackberry 5:
<?php include("header.inc"); ?>
<div data-role='header'><h1>Service Intervals</h1><a href='index.php' data-icon='home' rel='external' data-ajax='false' data-theme='b'>Home</a></div>
<div data-role='content'>
<ul data-role='listview' data-inset='true' data-filter='true'>
<li data-theme='e'><strong>Engine</strong><p class='ui-li-aside'><strong>HSI (HR) TBO (HR)</strong></p></li>
<?php
echo "<li>Beer</li>";
$f = fopen('engineChild.csv','rb');
echo "<li>Coffee</li>";
while (($rec = fgets($f)) !== FALSE) {
echo "<li>Bacon and Eggs</li>";
$i = explode('|',$rec);
echo "<li>".$i[11]."</li>\n";
}
echo "<li>Yellow</li>";
fclose($f);
?>
</ul>
</div>
<?php include('footer.inc'); ?>
The above code appears to crash out on the while() loop .... it does not bomb on the fopen() or fclose()
I have read about "PHP push" and declaring HTTP headers, I am not doing any of this nor do I really understand it .... do I need to add some php code to make the connection with the device and my apache php webserver?
Any words of wisdom will be helpful.
Paul
10-08-2011 08:31 PM
Do people really want their phone making decisions for them? Whatever happened to the human element? Stop this madness!