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/*">
Slow HTTP Denial of Service Attack 是以非常緩慢的速度進行http請求,霸佔伺服器服務,達到癱瘓伺服器的目的,解決方式即是設定 Timeout
PHP Laravel 取得客戶端IP的方式介紹
HTTP Strict Transport Security (HSTS) not implemented 未使用嚴格安全傳輸(HSTS),教你如何設定
使用Laravel orwhere時,在SQL語法上常常需要多個where條件,此時搭配or要如何指定or的群組呢,正確用法應該使用閉包的方式
Git版本控管如何以手動方式部署到Centos伺服器呢