for ($img=0;$img<=5;$img++)
{
if (!empty($_FILES['picture_add_'.$img]))
{
if ($this->upload->do_upload('picture_add_'.$img))
{
$uploaded = $this->upload->data();
$data_picture_add = array(
'filename' => $uploaded['file_name'],
'id' => $last_id
);
$this->db->insert('db_picture_individual', $data_picture_add);
}
}
}
2ファイル以上の画像を入力すると、1つのファイル名が暗号化されます。ファイル名の暗号化ファイルのアップロードコードシノニムのループの方法
どのようにすべてのファイル名を暗号化するのですか?
これは図である。
<input name="picture_add_1" class="form-control" style="padding-top: 0;" type="file">
<input name="picture_add_2" class="form-control" style="padding-top: 0;" type="file">
<input name="picture_add_3" class="form-control" style="padding-top: 0;" type="file">
<input name="picture_add_4" class="form-control" style="padding-top: 0;" type="file">
<input name="picture_add_5" class="form-control" style="padding-top: 0;" type="file">
使用しているフォームのHTMLを表示してください。 – RiggsFolly
RiggsFolly:上記のビューコードを挿入しました。ありがとうございました。 –
あなたが本当にする必要があると思うのは、[マニュアルのこの部分を読んでください](http://php.net/manual/en/features.file-upload.php) – RiggsFolly