-3
我試圖從6個附加圖像延伸自從每產品12倍的圖像上categories.php
但是,當我提交它僅示出了9 $ _FILES陣列中的文件 無論我改變什麼,我都不能超過9次。我嘗試了不同的變化只是爲了測試它,數組總是停在9個元素,第10個被截斷。任何人有一個想法可能會發生什麼?
這是sizeof $ _FILES和數組輸出。你可以看到它停在test2的,其餘的失蹤http://php.net/manual/en/ini.core.php#ini.sect.file-uploads
sizeof files:20
Array ([products_image] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_med] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_lrg] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_1] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_1] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_2] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_2] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_3] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_3] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_4] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_4] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_5] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_5] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_6] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_6] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_7] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_7] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_8] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_8] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [test2] => Array ([name] => letters_613.gif [type] => image/gif [tmp_name] => /var/www/html/web978/phptmp/php49lS7C [error] => 0 [size] => 3852)) Array ([products_image] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_med] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_lrg] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_1] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_1] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_2] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_2] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_3] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_3] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_4] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_4] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_5] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_5] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_6] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_6] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_7] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_7] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_sm_8] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [products_image_xl_8] => Array ([name] => [type] => [tmp_name] => [error] => 4 [size] => 0) [test2] => Array ([name] => letters_613.gif [type] => image/gif [tmp_name] => /var/www/html/web978/phptmp/php49lS7C [error] => 0 [size] => 3852))
你能告訴我們你的代碼嗎? – jasonbar
該代碼有幾千行,但你可以想象它是這樣的:
和4不會顯示在文件數組及其後面的所有文件中。我的第一個想法是,形式關閉停止某處更早,但那不是這種情況 –我添加sizeof $ _FILES和print_r爲$ _FILES當我提交 –