真奇怪 ecshop不知道怎样提交添加商品数据的
添加商品的时候,我抓了下包;数据如下。
提交处理的时候,act是等于insert才对的。
可ecshop 却依然调用了添加页面的 add。
而在request_playload中 发现了
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="act"
insert
真是奇怪,没看过这样的提交方式;不知道是怎样实现的。 查了ecshop的js,好像是用fckeditor控件来实现的。压缩了的js狠难理解。 求高人解释 谢谢!!
Request URL:http://127.0.0.1/ecshop/admin/goods.php?act=add
Request Method:POST
Status Code:200 OK
Request Headersview source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding:gzip,deflate,sdch
Accept-Language:zh-CN,zh;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Content-Length:5449
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryGOLQryEg8iRpGIYC
Cookie:ECS_LastCheckOrder=Tue%2C%2027%20Aug%202013%2002%3A37%3A55%20GMT; ECS[visit_times]=2; ECSCP_ID=4b60487471b9cb778258d82e6f44c5685cd773e8
Host:127.0.0.1
Origin:http://127.0.0.1
Referer:http://127.0.0.1/ecshop/admin/goods.php?act=add
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36
Query String Parametersview sourceview URL encoded
act:add
Request Payload
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="MAX_FILE_SIZE"
2097152
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_name"
MINGCHENG
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_name_color"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_name_style"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_sn"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="cat_id"
7
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="addedCategoryName"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="brand_id"
1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="addedBrandName"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="suppliers_id"
0
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="shop_price"
0
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="user_price[]"
-1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="user_rank[]"
1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="user_price[]"
-1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="user_rank[]"
3
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="user_price[]"
-1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="user_rank[]"
2
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="volume_number[]"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="volume_price[]"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="market_price"
0
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="give_integral"
-1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="rank_integral"
-1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="integral"
0
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="promote_start_date"
2013-08-27
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="promote_end_date"
2013-09-27
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_img"; filename=""
Content-Type: application/octet-stream
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_img_url"
ÉÌƷͼƬÍⲿURL
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="auto_thumb"
1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_desc"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_weight"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="weight_unit"
1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_number"
1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="warn_number"
1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="is_on_sale"
1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="is_alone_sale"
1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="keywords"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_brief"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="seller_note"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_type"
0
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="img_desc[]"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="img_url[]"; filename=""
Content-Type: application/octet-stream
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="img_file[]"
»òÕßÊäÈëÍⲿͼƬÁ´½ÓµØÖ·
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="cat_id1"
0
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="brand_id1"
0
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="keyword1"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="is_single"
1
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="cat_id2"
0
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="brand_id2"
0
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="keyword2"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="price2"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="article_title"
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="goods_id"
0
------WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="act"
insert
------WebKitFormBoundaryGOLQryEg8iRpGIYC--
Response Headersview source
Cache-Control:no-cache, must-revalidate
Connection:Keep-Alive
Content-Type:text/html; charset=gbk
Date:Tue, 27 Aug 2013 02:38:31 GMT
Expires:Fri, 14 Mar 1980 20:53:00 GMT
Keep-Alive:timeout=5, max=99
Last-Modified:Tue, 27 Aug 2013 02:38:31 GMT
Pragma:no-cache
Server:Apache/2.2.4 (Win32) PHP/5.2.3
Set-Cookie:ECSCP[last_choose]=7%7C1; expires=Wed, 28-Aug-2013 02:38:32 GMT
Transfer-Encoding:chunked
X-Powered-By:PHP/5.2.3
回复讨论(解决方案)
楼上无聊人发广告 !
形如
------WebKitFormBoundaryGOLQryEg8iRpGIYCContent-Disposition: form-data; name="brand_id"1
的是数据段
其中:
----WebKitFormBoundaryGOLQryEg8iRpGIYC 分隔符,表示一段开始(也可以说是上一段结束)
分隔符是动态产生的,这样申明的
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="brand_id" 一个字段,name 属性指示字段名
最后是值
http 协议中传送数据的格式有好几种,这是其中的一种
除非你想用 Socket 编程实现数据传输,并无了解这些细节的必要
ecshop添加商品的内容相对较多,但是是直接提交到本页面的php文件,和js无关。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

This is the second and final part of the series on building a React application with a Laravel back-end. In the first part of the series, we created a RESTful API using Laravel for a basic product-listing application. In this tutorial, we will be dev

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

In this article, we're going to explore the notification system in the Laravel web framework. The notification system in Laravel allows you to send notifications to users over different channels. Today, we'll discuss how you can send notifications ov

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot
