亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

一鍵提交圖像和表單

一鍵提交圖像和表單

PHP
江戶川亂折騰 2023-07-08 20:43:16
我有一個提交到數據庫的常規表單,但我想在表單中包含文件上傳,以便使用 PHP post 接收預期表中的表單輸入,并接收上傳的圖像。
查看完整描述

3 回答

?
繁星coding

TA貢獻1797條經驗 獲得超4個贊

使用類似的方法將文件以及其他輸入發送到處理頁面,您可以在其中訪問文件和發布變量。


<form action="#" method="post" enctype="multipart/form-data">

<input type="text" name="txtbox">

<br />

<input type="file" name="filebox">

<br />

<input type="submit" name="submit" value="submit">

</form>

提交后,您可以訪問 $_FILES 和 $_POST 中的數據


查看完整回答
反對 回復 2023-07-08
?
30秒到達戰場

TA貢獻1828條經驗 獲得超6個贊

用于<input type="file">在表單中包含文件上傳。



查看完整回答
反對 回復 2023-07-08
?
jeck貓

TA貢獻1909條經驗 獲得超7個贊

HTML 中有多種輸入類型,如下所示:


<input type="button">

<input type="checkbox">

<input type="color">

<input type="date">

<input type="datetime-local">

<input type="email">

<input type="file">

<input type="hidden">

<input type="image">

<input type="month">

<input type="number">

<input type="password">

<input type="radio">

<input type="range">

<input type="reset">

<input type="search">

<input type="submit">

<input type="tel">

<input type="text">

<input type="time">

<input type="url">

<input type="week">

上述每個輸入都需要滿足不同的條件和格式。


對于您的查詢,答案是:


<input type="file">

適用于需要文件格式輸入的網頁?;蛘?,


<input type="image">

適用于需要以圖像格式輸入的網頁。


查看完整回答
反對 回復 2023-07-08
  • 3 回答
  • 0 關注
  • 164 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號