欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

小弟我做一个xls文件下传 本地正常 爱服务器不正常 ,多了5条数据

程序员文章站 2022-06-16 17:17:21
...
我做一个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."
";
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`, `has_variants`, `variant_id`, `approved_by`, `approved_date`, `created_by`, `created_date`, `update_by`, `update_date`) VALUES ( '432', '0', '2667749211QWEhan', '2667749211QWEhan', '', '', '8H539', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'now()')
小弟我做一个xls文件下传  本地正常 爱服务器不正常 ,多了5条数据

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。

相关文章

相关视频