dongtan1009 2013-10-10 13:21
浏览 37

奇怪的$ _FILES无法识别文件字段条目

I have a page where I am uploading multiple files. The enctype IS correctly set, the php.ini file allows file uploads.

The page runs through a for loop, which calls the $id in each run of the loop. Using this, I have the fields created:

<td class="charts">
    <input type="checkbox" name="chartoneuse-{$id}" value="1" checked="checked" /> One-Hour Chart: {$chartone}<br />
    <input type="file" name="chartone-{$id}" id="chartone-{$id}" /><br /><br />
    <input type="checkbox" name="charttwouse-{$id}" value="1" checked="checked" /> Two-Hour Chart: {$charttwo}<br />
    <input type="file" name="charttwo-{$id}" id="charttwo-{$id}" /><br /><br />
    <input type="checkbox" name="chartfouruse-{$id}" value="1" checked="checked" /> Four-Hour Chart: {$chartfour}<br />
    <input type="file" name="chartfour-{$id}" id="chartfour-{$id}" /><br /><br />
    <input type="checkbox" name="chartdayuse-{$id}" value="1" checked="checked" /> Day Chart: {$chartday}<br />
    <input type="file" name="chartday-{$id}" id="chartdaily-{$id}" />
</td>

This is the same method that creates all the $_POST fields, as well.

When it runs through, it works well for 1, 2, 3, 4, 5, 6...but when it gets to 7, it's not seeing any files entered in $_FILES. It sees the $_POST for that.

When I run print_r on the $_POST, all 7 entries are shown. When I run it for $_FILES, 1-6 show, but 7 doesn't. It doesn't even see that any file was uploaded.

I know it's not the multipart, or the php.ini, because (as mentioned before), those are set correctly, and besides...if those were wrong, the other files would not be seen in the previous run-throughs. The code itself seems to work, because it works for 1-6.

And it's not a "size" issue, because I've used the SAME files to test in 7 that I use in 6.

Any hints/clues? This makes no sense to me.

Per request, I did a print_r with both the $_POST and the $_FILES, and here's the response:

PRINT R OF POST = Array ( [securitytoken] => BLOCKING THIS FOR SECURITY [posted] => true [userid] => 34858 [ready-1] => false [bias-1] => 0 [current-1] => 1.3575 [s1-1] => 1.346 [s2-1] => 1.3099 [s3-1] => 1.2755 [r1-1] => 1.3643 [r2-1] => 1.3709 [r3-1] => 1.3808 [summary-1] => Bullish [description-1] => Hello Traders, below you will find the technical analysis for the EURUSD pair for both the daily and the 2 hour time frame. The pair is is an UP capital ABCD swing. It has had a deep pullback just shy of the .786 Fibonanacci retracement level. Currently, the pair is stuck hovered around 1.3600. The EURUSD still has over 150 pips to reach the projected D extension of 1.618. Tune into Analysts on Demand to learn more about the proper entry and exits or to learn which strategy will work best. Daily A- 1.2660 B- 1.3710 120 A- 1.3450 B- 1.2292 [chartoneuse-1] => 1 [charttwouse-1] => 1 [chartfouruse-1] => 1 [chartdayuse-1] => 1 [ready-2] => false [bias-2] => 0 [current-2] => 1.6089 [s1-2] => 1.5944 [s2-2] => 1.5435 [s3-2] => 1.5206 [r1-2] => 1.6256 [r2-2] => 1.6341 [r3-2] => 1.6453 [summary-2] => Bullish [description-2] => Hello Traders, below you will find the technical analysis for the GBPUSD pair for both the daily and the 2 hour time frame. The pair is is an up capital ABCD swing. It has had a deep pullback to the .50 Fibonanacci retracement level. Currently, the pair has broken the counter trend line and we saw a BULLISH engulfing candle. The stochastic RSI left the over sold zone and looks like a good opportunity to go long in the short term. Tune into Analysts on Demand to learn more about the proper entry and exits or how to properly set up the for the next opportunity. Daily A- 1.5425 B- 1.6159 120 A- 1.5756 B- 1.6162 [chartoneuse-2] => 1 [charttwouse-2] => 1 [chartfouruse-2] => 1 [chartdayuse-2] => 1 [ready-3] => false [bias-3] => 2 [current-3] => 0.9432 [s1-3] => 0.9263 [s2-3] => 0.9215 [s3-3] => 0.8872 [r1-3] => 0.9438 [r2-3] => 0.9528 [r3-3] => 0.9662 [summary-3] => Bearish [description-3] => Hello Traders, below you will find the technical analysis for the AUDUSD pair for both the daily and the 2 hour time frame. The pair is is an up capital ABCD swing. It has had a deep pullback to the .786 Fibonanacci retracement level aiming for the 1.27 Fibonacci extension. Currently, the pair is setting up for counter trend line and we need to see a BULLISH candle stick formation. The stochastic RSI MUST be leaving the over sold zone and lit could be a good opportunity to go north in the short term. Tune into Analysts on Demand to learn more about the proper entry and exits or how to properly set up the for the next opportunity. Daily A- 0.9841 B- 0.9162 120 A- 0.9528 B- 0.9223 [chartoneuse-3] => 1 [charttwouse-3] => 1 [chartfouruse-3] => 1 [chartdayuse-3] => 1 [ready-4] => false [bias-4] => 1 [current-4] => 0.8294 [s1-4] => 0.8197 [s2-4] => 0.7722 [s3-4] => 0.7685 [r1-4] => 0.834 [r2-4] => 0.8434 [r3-4] => 0.8555 [summary-4] => Consolidation [description-4] => Hello Traders, below you will find the technical analysis for the NZDUSD pair for both the daily and the 2 hour time frame. The pair is is an up capital ABCD swing. It has a deep C pullback to the .618 Fibonacci retracement level.Currently, the pair has been in consolidation since the since mid-September. Tune into Analysts on Demand to learn more about the proper entry and exits or how to properly set up when the opportunity presents itself. Daily A - 0.7722 B- 0.8434 120 A - 0.8094 B - 0.8434 [chartoneuse-4] => 1 [charttwouse-4] => 1 [chartfouruse-4] => 1 [chartdayuse-4] => 1 [ready-6] => false [bias-6] => 2 [current-6] => 0.9039 [s1-6] => 0.8968 [s2-6] => 0.8933 [s3-6] => 0.8756 [r1-6] => 0.9136 [r2-6] => 0.9457 [r3-6] => 0.9533 [summary-6] => Bearish [description-6] => Hello Traders, below you will find the technical analysis for the USDCHF pair for both the daily and the 2 hour time frame. The pair is is a down capital ABCD swing. It has a very shallow retracement, pulling back short of the .382 Fibonanacci retracement level. Currently, the pair has yet to pick a direction as it has been in consolidation since the beginning of October. Tune into Analysts on Demand to learn more about the proper entry and exits or how to properly set up when the opportunity presents itself. Daily A - 0.8567 B- 0.9771 a -0.9021 b- 0.9454 120 A - 0.9455 B - 0.8992 [chartoneuse-6] => 1 [charttwouse-6] => 1 [chartfouruse-6] => 1 [chartdayuse-6] => 1 [update-7] => Update Analysis [ready-7] => true [bias-7] => 2 [current-7] => 96.97 [s1-7] => 96.8 [s2-7] => 95.78 [s3-7] => 93.77 [r1-7] => 98.7 [r2-7] => 99.65 [r3-7] => 100.64 [summary-7] => Bearish [description-7] => Hello Traders, below you will find the technical analysis for the USDJPY pair for both the daily and the 2 hour time frame. The pair is is a down capital ABCD swing. It has had a shallow, less than a .382 pullback so there is a possibility of a deeper retracement ( remember the 80/20 rule). Currently, the pair has broken the counter trend line and has given a bearish candle stick setting up for a nice evening star. The stochastic is leaving the over bought zone and looks like a good opportunity to short. Tune into Analysts on Demand to learn more about the proper entry and exits. Daily A- 90.84 B- 99.94 120 A- 99.66 B- 97.14 [chartoneuse-7] => 1 [charttwouse-7] => 1 [chartfouruse-7] => 1 [chartdayuse-7] => 1 [ajax] => ) 

PRINT R OF FILES = Array ( [chartone-1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [charttwo-1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartfour-1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartday-1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartone-2] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [charttwo-2] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartfour-2] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartday-2] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartone-3] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [charttwo-3] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartfour-3] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartday-3] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartone-4] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [charttwo-4] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartfour-4] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartday-4] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartone-6] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [charttwo-6] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartfour-6] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [chartday-6] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) ) 
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
    • ¥20 神经网络Sequential name=sequential, built=False
    • ¥16 Qphython 用xlrd读取excel报错
    • ¥15 单片机学习顺序问题!!
    • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
    • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
    • ¥15 相敏解调 matlab
    • ¥15 求lingo代码和思路
    • ¥15 公交车和无人机协同运输
    • ¥15 stm32代码移植没反应