如何使用PHP远程CURL在HTML中显示所有上传的图像

问题描述 投票:0回答:2

[嗨,我是PHP的新手,正在使用此PHP cURL for Downloading File From Url

我目前正在尝试解决下面的PHP foreach代码,因为我试图回显所有图像,并且可以在PHP中工作,但是在HTML中可以显示一个图像?

PHP

$image = array('<img src="'.$file_path.'" width="250" />');

foreach ($image as $key => $images) {
echo $images;
}

HTML

    <form method="post">
  <div class="form-group">
   <input type="text" name="url[]" /><br />
   <input type="text" name="url[]" /><br />
   <input type="text" name="url[]" /><br />
   <input type="text" name="url[]" /><br />
   <input type="text" name="url[]" /><br />
  </div>
  <br />
  <input type="submit" name="download" value="Download" />
  <br />
  <?php echo $images; ?>
</form>
php html
2个回答
0
投票

欢迎堆栈溢出。


0
投票

尝试一下:PHP:

© www.soinside.com 2019 - 2024. All rights reserved.