First picture
Principle of implementation
First read the data, write the corresponding segment of the CSV row with the corresponding data segment, and then save it as CSV. The test passed in the latest version of Taobao Assistant
Implementation code
Copy code The code is as follows:
function totaobao()
{
;
Method, product price, price increase, product quantity, validity period, freight burden, surface mail, EMS, express delivery, payment method, Alipay, invoice, warranty, automatic reissue, put in warehouse, window recommendation, start time, mood story, product description , baby pictures, baby attributes, group purchase price, minimum number of group purchase pieces, postage template ID, member discount, modification time, upload status, picture status, rebate ratio, new pictures, videos, sales attribute combinations, user input ID string, user input name -Value pair, merchant code, sales attribute alias, recharge type, baby number");
header("Content-type:text/csv");
header("Content-Disposition:attachment ;filename=ybkgoods.csv");
header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
header('Expires:0');
header('Pragma:public');
echo "$headern";
//Output data body
foreach($result as $value)
{
/ /Filter description field
$desc = csvdatafilter("www.yibaikuan.com",$value['goods_desc']); goods_thumb'],24,25);
,Zhejiang,Jinhua,b,".$value['shop_price'].",0,".$value['goods_number'].",14,1,20,20,10,,,0,0,1 ,0,1,,,".$desc.",,,,,0,0,,100,,0,".$img.":0:0:|;,,,,,,,0, ");
echo "$bodyn"; HTML code filtering issues in
3. Pay attention to the path of the image
Conclusion:
The principles of CSV generated for Taobao, Paipai, and Youah Assistant are almost the same. You can test it if necessary.
http://www.bkjia.com/PHPjc/321425.html
www.bkjia.com
true
http: //www.bkjia.com/PHPjc/321425.html
TechArticle
First, the picture is shown to implement the principle. First, read the data and write the corresponding segment of the CSV row with the corresponding data segment. , and then save it as CSV. The implementation code was tested in the latest version of Taobao Assistant...