Table of Contents
回复讨论(解决方案)
Home Backend Development PHP Tutorial 真奇怪 ecshop不知道怎样提交添加商品数据的

真奇怪 ecshop不知道怎样提交添加商品数据的

Jun 23, 2016 pm 02:20 PM

添加商品的时候,我抓了下包;数据如下。
提交处理的时候,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
Copy after login

的是数据段
其中:
----WebKitFormBoundaryGOLQryEg8iRpGIYC 分隔符,表示一段开始(也可以说是上一段结束)
分隔符是动态产生的,这样申明的
Content-Type:multipart/form-data; boundary=----WebKitFormBoundaryGOLQryEg8iRpGIYC
Content-Disposition: form-data; name="brand_id" 一个字段,name 属性指示字段名
最后是值

http 协议中传送数据的格式有好几种,这是其中的一种
除非你想用 Socket 编程实现数据传输,并无了解这些细节的必要

ecshop添加商品的内容相对较多,但是是直接提交到本页面的php文件,和js无关。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Working with Flash Session Data in Laravel Working with Flash Session Data in Laravel Mar 12, 2025 pm 05:08 PM

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-

Build a React App With a Laravel Back End: Part 2, React Build a React App With a Laravel Back End: Part 2, React Mar 04, 2025 am 09:33 AM

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

cURL in PHP: How to Use the PHP cURL Extension in REST APIs cURL in PHP: How to Use the PHP cURL Extension in REST APIs Mar 14, 2025 am 11:42 AM

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.

Simplified HTTP Response Mocking in Laravel Tests Simplified HTTP Response Mocking in Laravel Tests Mar 12, 2025 pm 05:09 PM

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' =>

12 Best PHP Chat Scripts on CodeCanyon 12 Best PHP Chat Scripts on CodeCanyon Mar 13, 2025 pm 12:08 PM

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

Notifications in Laravel Notifications in Laravel Mar 04, 2025 am 09:22 AM

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

Explain the concept of late static binding in PHP. Explain the concept of late static binding in PHP. Mar 21, 2025 pm 01:33 PM

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: Best Practices for PHP Log Analysis PHP Logging: Best Practices for PHP Log Analysis Mar 10, 2025 pm 02:32 PM

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

See all articles