首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > PHP >

报错syntax error, unexpected $end,请教什么原因

2013-06-25 
报错syntax error, unexpected $end,请问什么原因!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transiti

报错syntax error, unexpected $end,请问什么原因


<!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>download</title>
</head>

<body>

<table width="1829" border="0" cellspacing="0">
  <tr>
    <td width="1827" height="79"><table width="100%" border="0" cellspacing="0">
      <tr>
        <td>&nbsp;</td>
      </tr>
  
      <tr>
        <td height="26"> <form id="form1" name="form1" method="post" action="download_all.php">Please enter the need to look at the record of the last few days:
         
                  <input name="text" type="text" size="5" />
            <input name="search" type="submit" value="Search" />
          </form>
          </td>
      </tr>
      <tr>
        <td height="34">&nbsp;</td>
      </tr>
    </table></td>
  
  <tr></tr>
    <td height="244" valign="top">

<table width="1827" border="0" cellspacing="1" bgcolor="#999999">
      <tr>
        <td width="105" height="20" bgcolor="#EEEEEE">warehouse_mix</td>
        <td width="160" bgcolor="#EEEEEE">warehouse_mix_label_pdf</td>
        <td width="151" bgcolor="#EEEEEE">mix_pdf_address_label</td>
        <td width="167" bgcolor="#EEEEEE">mix_pdf_address_label_A4</td>
        <td width="53" bgcolor="#EEEEEE">&nbsp;</td>
        <td width="50" bgcolor="#EEEEEE">&nbsp;</td>
        <td width="53" bgcolor="#EEEEEE">&nbsp;</td>
        <td width="66" bgcolor="#EEEEEE">&nbsp;</td>
        <td width="151" bgcolor="#EEEEEE">&nbsp;</td>
        <td width="127" bgcolor="#EEEEEE">&nbsp;</td>
        <td width="178" bgcolor="#EEEEEE">&nbsp;</td>
        <td width="223" bgcolor="#EEEEEE">&nbsp;</td>
        <td width="303" bgcolor="#EEEEEE">&nbsp;</td>


      </tr>
  
 <?PHP
  
include("conn.php");

  if(isset($_POST['text']))
    {
  $text=$_POST['text'];
  $t = date('Ymd', strtotime("-$text day"));
$hk_label = array();
foreach(glob('download/*_Warehouse_mix*.txt') as $hk_label_fn) {
  if(substr($hk_label_fn, 8, 8)>$t){ $hk_label[] = $hk_label_fn;
  }
}





 }
  else
  {
  $t = date('Ymd', strtotime('-5 day'));
$hk_label = array();
foreach(glob('download/*_Warehouse_mix*.txt') as $hk_label_fn) {
  if(substr($hk_label_fn, 8, 8)>$t){ $hk_label[] = $hk_label_fn;
  {
   $hk_label[] = $hk_label_fn;
  }


}


$jp_warehouse_count=count($jp_warehouse);


$c=max($jp_label_count,$hk_label_count,$hk_warehouse_count,$jp_warehouse_count);

for($i=0;$i<$c;$i++)
{
  ?>
 
      <tr>
         <td height="31" bgcolor="#FFFFFF"><a href="<?PHP echo $hk_label[$i]; ?>"><?PHP echo substr($hk_label[$i], 8, 24); ?></a></td>
 <td bgcolor="#FFFFFF"></td>
       <td bgcolor="#FFFFFF"></td>
       <td bgcolor="#FFFFFF"></td>
       <td bgcolor="#FFFFFF">&nbsp;</td>
       <td bgcolor="#FFFFFF">&nbsp;</td>
       <td bgcolor="#FFFFFF">&nbsp;</td>
       <td bgcolor="#FFFFFF">&nbsp;</td>
       <td bgcolor="#FFFFFF">&nbsp;</td>
       <td bgcolor="#FFFFFF">&nbsp;</td>
       <td bgcolor="#FFFFFF">&nbsp;</td>
       <td bgcolor="#FFFFFF">&nbsp;</td>
       <td bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
<?PHP }  ?>

      <tr>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>


        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
    </table>


</td>
  </tr>
  <tr>
    <td height="109">&nbsp;</td>
  </tr>
</table>
</body>
</html>



报错请问什么原因???
Parse error: syntax error, unexpected $end in E:\APMServ5.2.6\www\htdocs\amazon\download_all.php on line 133
[解决办法]
foreach(glob('download/*_Warehouse_mix*.txt') as $hk_label_fn) {
  if(substr($hk_label_fn, 8, 8)>$t){ $hk_label[] = $hk_label_fn;
  {
   $hk_label[] = $hk_label_fn;
  }
}     
   

热点排行