时间:2021-07-01 10:21:17 帮助过:8人阅读
array('image_src' => $pic, 'image_name' => '随机字符串.jpg'),
);
HTML 向PHP post一条数据 $_POST['pic'];
其中数据为http://www.baidu.com/1.pic;ht...等等
如何循环这条语句 每个$pic获取一条地址
array('image_src' => $pic, 'image_name' => '随机字符串.jpg'),
);
HTML
php
$pics = $_GET['pic'];
$data = [];
foreach ($pics as $key => $value) {
$data[] = [
'image_src' =>$value,
'image_name' => mt_rand(1, 1111) . '.jpg'
];
}
//over
pic[]=XXX.jpg&pic[]=XXX.jpg