0

私はphpプロジェクトを持っており、それをfedoraからwindowsに移動しようとしています。ファイルを移動し、それらにアクセスでき、データベースにもアクセスできますが、奇妙なエラーが発生します

SCREAM: Error suppression ignored for

( ! ) Parse error: syntax error, unexpected end of file in C:\wamp\www\portfolio\templates\sell_form.php on line 21
Call Stack
#   Time    Memory  Function    Location
1   0.0029  259504  {main}( )   ..\sell.php:0
2   0.1515  304656  render( )   ..\sell.php:67

このファイル

<table class="table table-hover center-table table-bordered">
        <tr>
        <th>Symbol</th>
        <th>Name</th>
        <th>Shares</th>
        <th>Price</th>
        <th>Total</th>
        </tr>
<?php foreach ($shares as $row): ?>

        <tr>
        <td><?= $row["symbol"]?></td>
        <td><?= $row["name"]?></td>
        <td><?= $row["shares"]?></td>
        <td>$<?= number_format($row["price"],4)?></td>
        <td>$<?= number_format($row["total"],4)?></td>
        </tr>

<? endforeach ?>

<tr>
    <td>CASH</td>
    <td></td>
    <td></td>
    <td></td>
    <td>$<?= number_format($cash[0]["cash"], 4)?></td>

</tr>

</table>
4

2 に答える 2

2
<?php endforeach; ?>

そこのコンマとphpタグを忘れました。短いタグをオンにしない限り、機能しません。

于 2013-03-22T00:57:07.983 に答える
1

ループの終了ステートメントが正しく設定されていません

<? endforeach; ?>
于 2013-03-22T00:58:28.450 に答える