HTML使用input上傳檔案時,若想要限制檔案的類型時可以使用accept屬性。
指定副檔名
指定副檔名必須為csv
<input type="file" name="file" accept=".csv">
指定副檔名必須為pdf
<input type="file" name="file" accept=".pdf">
指定副檔名為一個以上時,可以使用逗號分開
<input type="file" name="file" accept=".csv,.pdf">
指定為某種type
圖片類型:
<input type="file" name="file" accept="image/*">
HTML類型:
<input type="file" name="file" accept="text/html">
影片類型:
<input type="file" name="file" accept="video/*">
音訊類型
<input type="file" name="file" accept="audio/*">
當我們使用SSH連線時,該如何限制IP,設定允許連線的IP白名單呢,以Centos7為例。
了解什麼是SEO(搜尋引擎優化)。
經歷了多個alpha版本後Bootstrap 5 beta版於2020年12月7日釋出
Composer 是一個套件管理工具,用途是在專案中可以透過簡易的指令將所使用的套件或程式碼庫安裝於專案內。
當我們使用 migrate 出現以下訊息:Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes