日期:2014-05-17  浏览次数:20558 次

我做一个xls文件上传 本地正常 爱服务器不正常 ,多了5条数据
print_r($array);
// exit();
foreach($array as $v){

// print_r($v);
// exit;
 $sql="INSERT INTO `inventory_prod_def` ( `user_no`,`supplier_id`, `prod_id`, `prod_sku`, `type`, `standard_prod_id`, `title`, `title_native`, `description`, 
    `description_native`, `prod_features`, `prod_features_native`, `dimension_measure_unit`, `prod_length`, `prod_width`, `prod_height`, `prod_package_length`, 
    `prod_package_width`, `prod_package_height`, `weight_measure_unit`, `prod_package_weight`, `prod_shipping_weight`, `packing_factor`, `shipping_factor`,
     `shipping_cost`, `brand`, `number_of_items`, `manufacturer`, `prod_mpn`, `msrp`, `msrp_currency`, `prod_external_url`, `meta_keyword`, `meta_description`,
      `prod_status`, `has_variants`, `variant_id`, `approved_by`, `approved_date`, `created_by`, `created_date`, `update_by`, `update_date`) VALUES (
     '{$_SESSION['user_no']}',  '$v[18]', '$v[3]', '$v[3]', '', '', '$v[6]', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 
       '', '', '$v[product_key]', '', '', '', '',  '', '$v[audit_date]', '', '$v[publish_date]', '', 'now()')";

 echo $sql."<br>";
 exit;
这是我的程序  下面是输出结果  不知道其它的5条数据是怎么出来的
Array ( [0] => Array ( [1] => 1 [2] => [3] => 2667749211QWEhan [4] => [5] => [6] => 8H539 [7] => Gold Photo Frame [8] => [9] => ::8H539::8H539 [10] => 10000 [11] => |Furniture & Furnishings|Home Decor|Photo & Picture Frames [12] => 39601.574282407 [13] => 已上架 [14] => [15] => [16] => [17] => 0 [18] => 0 [19] => 1 [20] => [21] => [22] => [23] => [24] => ) [upload_time] => 2013-01-25 21:16:14 [up_file_name] => trade2cn_product_data_bak.xls [up_file_url] => /opt/lampp/htdocs/dev_utoo/userdata/partners/trade2cn/datafeed/uploaded/20130125/20130125211614_productinfo.xls [up_file_size] => 16896 [extension] => xls ) INSERT INTO `inventory_prod_def` ( `user_no`,`supplier_id`, `prod_id`, `prod_sku`, `type`, `standard_prod_id`, `title`, `title_native`, `description`, `description_native`, `prod_features`, `prod_features_native`, `dimension_measure_unit`, `prod_length`, `prod_width`, `prod_height`, `prod_package_length`, `prod_package_width`, `prod_package_height`, `weight_measure_unit`, `prod_package_weight`, `prod_shipping_weight`, `packing_factor`, `shipping_factor`, `shipping_cost`, `brand`, `number_of_items`, `manufacturer`, `prod_mpn`, `msrp`, `msrp_currency`, `prod_external_url`, `meta_keyword`, `meta_description`, `prod_status`,&nb