真奇怪 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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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

Alipay PHP...

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,

Session hijacking can be achieved through the following steps: 1. Obtain the session ID, 2. Use the session ID, 3. Keep the session active. The methods to prevent session hijacking in PHP include: 1. Use the session_regenerate_id() function to regenerate the session ID, 2. Store session data through the database, 3. Ensure that all session data is transmitted through HTTPS.

The application of SOLID principle in PHP development includes: 1. Single responsibility principle (SRP): Each class is responsible for only one function. 2. Open and close principle (OCP): Changes are achieved through extension rather than modification. 3. Lisch's Substitution Principle (LSP): Subclasses can replace base classes without affecting program accuracy. 4. Interface isolation principle (ISP): Use fine-grained interfaces to avoid dependencies and unused methods. 5. Dependency inversion principle (DIP): High and low-level modules rely on abstraction and are implemented through dependency injection.

The enumeration function in PHP8.1 enhances the clarity and type safety of the code by defining named constants. 1) Enumerations can be integers, strings or objects, improving code readability and type safety. 2) Enumeration is based on class and supports object-oriented features such as traversal and reflection. 3) Enumeration can be used for comparison and assignment to ensure type safety. 4) Enumeration supports adding methods to implement complex logic. 5) Strict type checking and error handling can avoid common errors. 6) Enumeration reduces magic value and improves maintainability, but pay attention to performance optimization.

How to debug CLI mode in PHPStorm? When developing with PHPStorm, sometimes we need to debug PHP in command line interface (CLI) mode...

How to automatically set the permissions of unixsocket after the system restarts. Every time the system restarts, we need to execute the following command to modify the permissions of unixsocket: sudo...

Static binding (static::) implements late static binding (LSB) in PHP, allowing calling classes to be referenced in static contexts rather than defining classes. 1) The parsing process is performed at runtime, 2) Look up the call class in the inheritance relationship, 3) It may bring performance overhead.
