如果用戶從輸入type = file上傳圖像,則需要處理,然後傳遞路徑,否則傳遞img src路徑。如果用戶從輸入type = file上傳圖像,則傳遞路徑,否則傳遞img src路徑。
怎麼樣?
<div class="thumb thumb-rounded thumb-slide">
<img src="<?php echo $result['staff_signature'];?>" alt="Signature IS BLANK">
<div class="caption">
<input type="file" class="file-input" data-show-caption="false" data- show-upload="false" accept="image/*" id="signature" name="signature">
</div>
</div>
您能更具體地瞭解您的要求嗎? –
請分享相關代碼並更好地解釋您的問題 – vlk
如果你想知道如何使用PHP上傳文件,請檢查此參考資料 - https://www.w3schools.com/php/php_file_upload.asp – mi6crazyheart