<!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> </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"> </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"> </td> <td width="50" bgcolor="#EEEEEE"> </td> <td width="53" bgcolor="#EEEEEE"> </td> <td width="66" bgcolor="#EEEEEE"> </td> <td width="151" bgcolor="#EEEEEE"> </td> <td width="127" bgcolor="#EEEEEE"> </td> <td width="178" bgcolor="#EEEEEE"> </td> <td width="223" bgcolor="#EEEEEE"> </td> <td width="303" bgcolor="#EEEEEE"> </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"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> </tr> <?PHP } ?> <tr> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> <td bgcolor="#FFFFFF"> </td> </tr> </table> </td> </tr> <tr> <td height="109"> </td> </tr></table></body></html>
看似括号匹配错了,看了看,没找到
报错的原因就是最后少加了一个 }
加上就好了
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;
}
}