window.open,get参数在部署到服务器

时间:2016-04-06 19:59:48

标签: javascript java php html mysql

嗨大家好我正在使用windows.open()进行打印报告。如果我在本地使用我的xampp一切都很好。但是当我部署时,发生了奇怪的事情

<?php
$salesRecord = $_GET['sr_record'];
echo $salesRecord;
require_once '../../resources/db.config.php';

    $db = DATABASE::instance();
    $mysqli = $db->get(); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />   
    <title>SOB CASH RECEIPT</title> 
    <link rel='stylesheet' type='text/css' href='css/style2.css' />
    <link rel='stylesheet' type='text/css' href='css/print.css' media="print" />
</head>

<!--<body onload="window.print(); window.close();">-->
<body onload="window.print();">
    <div id="page-wrap">
        <textarea id="header">SOB CASH RECEIPT</textarea>
        <div style="clear:both"></div>
            <div id="customer">               
            </div>

            <table id="items" style="margin: 10px 0 0 0;">  
                <tr>
                    <th style="width: 3%;">No</th>
                    <th style="width: 15%;">Flight #</th>
                    <th style="width: 12%;">Date</th>
                    <th style="width: 15%;">Route</th>
                    <th style="width: 15%;">Total Sales</th>
                    <th style="width: 15%;">IDR</th>
                    <th style="width: 15%;">US$</th>
                </tr>
<?php
$cr1res = $mysqli->query("SELECT ds.flight_id, ds.flight_date, ds.flight_sector, ds.total_payment, ds.cash_sales_amount "
        . "FROM detail_sr ds WHERE ds.SR_ID = '$salesRecord'");
$count = 1;
while ($row = mysqli_fetch_assoc($cr1res)) {
?>
                <tr class="item-row">
                    <td align="center"><span class="price"><?php echo $count; ?></span></td>
                    <td align="center"><span class="price">GA <?php echo $row['flight_id']; ?></span></td>
                    <td align="center"><span class="price"><?php echo $row['flight_date']; ?></span></td>
                    <td align="center"><span class="price"><?php echo $row['flight_sector']; ?></span></td>
                    <td align="right"><span class="price"><?php echo number_format($row['total_payment']); ?></span></td>
                    <td align="right"><span class="price"><?php echo number_format($row['cash_sales_amount']); ?></span></td>

数据库中的数据没有显示,只有半页显示在此行之前

<?php
$totalMaster = $mysqli->query("select sum(ds.master_sales_amount) summaster from detail_sr ds where ds.SR_ID = '$salesRecord'")->fetch_object()->summaster;
$totalVisa = $mysqli->query("select sum(ds.visa_sales_amount) sumvisa from detail_sr ds where ds.SR_ID = '$salesRecord'")->fetch_object()->sumvisa;
?>
<textarea id="header">CREW MOTIVATION PROGRAM</textarea>

这条线后的一切都消失了...... 我的错误代码如下,

“NetworkError:500内部服务器错误 - http://148.109.100.21/SOBCASHIER/html/reports/cashreceipt_print.php?sr_record=2016/04/06/SR-SOB-888-1

请帮我解决这件事......

0 个答案:

没有答案