2014-02-20 1 views
0

webview를 통해 웹 페이지를 표시하는 응용 프로그램이 있습니다. 그러나 한 페이지에서 진행률 대화 상자가 완료된로드 페이지에서 닫히지 않습니다. 이 페이지의 PHP 코드입니다.onPageFinished가 특정 페이지에서 실행되지 않습니다.

<?php 
session_start(); 
include 'connect.php'; 

//hesap php ye verilen link restoran adi degiskenini de icermeli 
$restadi = $_GET["restadi"]; 
//Toplam deger sifirlaniyor 
$uruntotal = 0; 
echo '<html>'; 
echo '<head>'; 
echo '<link rel="stylesheet" type="text/css" href="sepet.css">'; 
echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'; 
echo '</head>'; 
echo "<table class='hesap'>"; 

//hesap oturumundaki her eleman icin ayri sorgu olusturuluyor 
foreach($_SESSION['hesap'] as $urunid => $urunsayi) { 
// $urunid urunun veritabanindaki kodu $urunsayi da siparisteki sayisi 
// $urunid bilgisi ile veritabanindan urun adi ve fiyati aliniyor 
$restadi = mysql_real_escape_string($restadi); 
$urunid = mysql_real_escape_string($urunid); 
$data = mysql_query("SELECT * FROM $restadi WHERE urunid=$urunid"); 
$db = mysql_fetch_array($data); 


//siparisin toplam fiyati hesaplaniyor 
$urunfiyat = $db['urunfiyat'] * $urunsayi; 
$uruntotal = $urunfiyat + $uruntotal; 
//veriler tablo halinde ekrana basiliyor 
echo '<tr>'; 
echo '<td class="urunadi">'.$db['urunadi'].'</td>'; 
echo '<td class="urunfiyat">'.$urunfiyat.' TL</td>'; 
echo '</tr>'; 
}; 
echo '</table>'; 
//toplam ayri tabloya yaziliyor 
echo '<table style="float: right;" border="5px">'; 
echo '<tr>'; 
echo '<td>Toplam</td>'; 
echo '<td class="urunfiyat">'.$uruntotal.' TL</td>'; 
echo '</tr>'; 
echo '</table>'; 

echo '</body>'; 
echo '</html>'; 
?> 

추 신 : 감손 된 그림 리스너를 사용하고 싶지 않습니다. 그리고이 상황은 세션 사용과 관련이 없습니다. 이것은 세션을 사용하는 유일한 페이지가 아니기 때문입니다.

답변

0

해결책을 찾았습니다. onpagefinished가 실제로 발생하므로 문제가되지 않습니다. 이것은 PHP 파일에서 리다이렉션을 사용할 때 발생합니다. 그냥 PHP 위치에 약간의 지연을 추가하고 문제가 없어집니다.

관련 문제