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/*">
Laravel beginTransaction 使用$connection指定連線資料庫時若單純rollback會發生失敗的情況
當我們使用SSH連線時,該如何限制IP,設定允許連線的IP白名單呢,以Centos7為例。
Slow HTTP Denial of Service Attack 是以非常緩慢的速度進行http請求,霸佔伺服器服務,達到癱瘓伺服器的目的,解決方式即是設定 Timeout
Centos系統實例安裝遠端桌面,以GCP服務為例示範
WAMP出現error msvcr120.dll msvcr110.dll錯誤