Heim >Backend-Entwicklung >PHP-Tutorial > 报错Notice: Undefined offset: 一
报错Notice: Undefined offset: 1
<br> <?PHP <br /> <br> include("conn.php");<br> <br> if(isset($_POST['text']))<br> {<br> $text=$_POST['text'];<br> $t = date('Ymd', strtotime("-$text day"));<br> <br> }<br> else<br> {<br> $t = date('Ymd', strtotime('-5 day'));<br> <br> }<br> <br> //warehouse_mix.txt <br> $hk_warehouse = array();<br> foreach(glob('download/hk_warehouse_mix*.txt') as $hk_warehouse_fn) {<br> if(substr($hk_warehouse_fn, 16, 8)>$t)<br> {<br> $hk_warehouse[] = $hk_warehouse_fn;<br> }<br> }<br> $jp_warehouse=array();<br> foreach(glob('download/jp_warehouse_mix*.txt') as $jp_warehouse_fa) {<br> if(substr($jp_warehouse_fa, 16, 8)>$t)<br> { <br> $jp_warehouse[] = $jp_warehouse_fa;<br> }<br> }<br> <br> $mix_warehouse=array();<br> foreach(glob('download/mix_warehouse_mix*.txt') as $mix_warehouse_fa) {<br> if(substr($mix_warehouse_fa, 17, 8)>$t)<br> { <br> $mix_warehouse[] = $mix_warehouse_fa;<br> }<br> }<br> <br> $sum_warehouse=array();<br> foreach(glob('download/sum_warehouse_mix*.txt') as $sum_warehouse_fa) {<br> if(substr($sum_warehouse_fa, 17, 8)>$t)<br> { <br> $sum_warehouse[] = $sum_warehouse_fa;<br> }<br> }<br> <br> <br> //warehouse_mix_label.pdf<br> <br> $hk_warehouse_pdf = array();<br> foreach(glob('download/hk_warehouse_mix*.pdf') as $hk_warehouse_pdf_fn) {<br> if(substr($hk_warehouse_pdf_fn, 16, 8)>$t)<br> {<br> $hk_warehouse_pdf[] = $hk_warehouse_pdf_fn;<br> }<br> }<br> $jp_warehouse_pdf=array();<br> foreach(glob('download/jp_warehouse_mix*.pdf') as $jp_warehouse_pdf_fa) {<br> if(substr($jp_warehouse_pdf_fa, 16, 8)>$t)<br> { <br> $jp_warehouse_pdf[] = $jp_warehouse_pdf_fa;<br> }<br> }<br> <br> $mix_warehouse_pdf=array();<br> foreach(glob('download/mix_warehouse_mix*.pdf') as $mix_warehouse_pdf_fa) {<br> if(substr($mix_warehouse_pdf_fa, 17, 8)>$t)<br> { <br> $mix_warehouse_pdf[] = $mix_warehouse_pdf_fa;<br> }<br> }<br> <br> //pdf_mix<br> <br> <br> $hk_pdf = array();<br> foreach(glob('download/HK_print_Mix*.pdf') as $hk_pdf_fn) {<br> if(substr($hk_pdf_fn, 12, 8)>$t)<br> {<br> $hk_pdf[] = $hk_pdf_fn;<br> }<br> }<br> $jp_pdf=array();<br> foreach(glob('download/JP_print_Mix*.pdf') as $jp_pdf_fa) {<br> if(substr($jp_pdf_fa, 12, 8)>$t)<br> { <br> $jp_pdf[] = $jp_pdf_fa;<br> }<br> }<br> <br> $mix_pdf=array();<br> foreach(glob('download/Mix_print_Mix*.pdf') as $mix_pdf_fa) {<br> if(substr($mix_pdf_fa, 13, 8)>$t)<br> { <br> $mix_pdf[] = $mix_pdf_fa;<br> }<br> }<br> <br> //pdf_mix_A4<br> <br> $hk_pdf_a4 = array();<br> foreach(glob('download/HK_print_Mix_A4_*.pdf') as $hk_pdf_a4_fn) {<br> if(substr($hk_pdf_a4_fn, 16, 8)>$t)<br> {<br> $hk_pdf_a4[] = $hk_pdf_a4_fn; <div class="clear"> </div>