我正在使用 PHP 将数据发送到 ASP DBA 数据库文件。真正的问题是Request.QueryString('data')
似乎附加数据,而不是在循环中使用新数据,就像它在缓存一样。
守则(简体)
在 PHP 方面: 这是一个 5x 的循环,ProductID 将是 001,002,003,004,005
$fields = array(
'OrdersID' => $orderid, //001,002
'productID' => $row2['orderprodid']
}
send_data($curl);
在 ASP 方面:
Response.Write(Request.QueryString("OrdersID")&",")
Response.Write(Request.QueryString("productID"&"||"))
结果
循环 1:
7777,001
循环2:(为什么这里是第一位数据?这是一个新的CURL流。)
7777,001,7777,002
循环 3:
404 - 找不到文件或目录。
更新
这是我的输出数据的示例。如您所见,第二个数据循环中有额外的数据!这就是问题。
数据字符串:
OrderID=99911250&OrderDate=2013-11-8+03%3A58%3A08+PM&LastName=Lanister&FirstName=J`amie&CompanyName=Lionsport&Email=guest%40user.com&ShipAddress=88+Richway&ShipCity=Casterly&ShipState=California&shipstatecode=California&ShipPostalCode=90210&ShipCountry=United+States&ShipCountryID=226&PhoneNumber=999-000-2342&ShipFax=&ShipContactFirstName=Jamie&ShipContactLastName=Lanister&ShipTaxid=&billcompanyname=Lionsport&billemail=&billaddress=&billcity=&billprovinceid=&billstate=&billstatecode=&billpostalcode=&billcountry=&billcountryid=00&billphonenumber=&billfax=&billcontactfirstname=&billcontactlastname=&billtaxid=&CardNumber=&CardType=&ExpMonth=&ExpYear=&CardVendor=Visa&securitycode=&Comments=&Subtotal=286.0000&Shipping=&Tax=&tax_rate=&pst=&pst_rate=&GrandTotal=286.0000&amount_owing=0&ShipWeight=0&blnShipping=0&Status=0&promo_code=none&promo_desc=none&promo_amount=0&POnumber=0&shipping_company=0&InvoiceNumber=0&DateInvoiced=0&ChequeNumber=0&DistributorOrder=0&blnAccepted=0&blnShipped=0&blnInvoiced=0&blnDelivered=0&blnArchived=1&blnSecondNotice=0&blnCancelled=0&shipping_instructions=0&trans_response_code=1&trans_response=0&trans_payment_url=0&discount_percent=&discount_amount=0&blnoldsystem=0&order_type=nonschedulea&userid=0000000&OrdersID=99942945&productID=2941&Quantity=1&quantity_shipped=1&quantity_shipped_current=0&Name=1&UnitPrice=1&SubTotal=1&Weight=1&blnAccepted=1&blnShipped=0&blnDelivered=0&shipping_company=ANDYSHIP&TrackingNumber=000000000&DateShipped=0&depotid=0&shippingid=0&shipping_sequence=0&carrier_companyid=0&assembly_trans_id=ANDY`
回复
----------------LOOP 1----------------------------
999429452941
1
1
0
1
1
286.0000, 1
1
0, 1
0, 0
0, 0
0, ANDYSHIP
000000000
0
0
0
0
0
ANDY
------------------LOOP 2----------------------------
999429452941, 2940
1, 1 (SEE THE " ,1" - THIS SHOULD'NT BE HERE)
1, 1
0, 0
1, 1
1, 1
286.0000, 1, 1
1, 1
0, 1, 1
0, 0, 0
0, 0, 0
0, ANDYSHIP, ANDYSHIP
000000000, 000000000
0, 0
0, 0
0, 0
0, 0
0, 0
ANDYOrdersID=99942945, ANDY
所以问题是我的请求数据“增长”
1
1,1
1,1,1
解决方案。 我真笨。我在每个循环上发送相同的 CURL 数据。当我修复循环时,您的解决方案非常有效。谢谢....!