Search
 
SCRIPT & CODE EXAMPLE
 

PHP

check what kind of file was uploaded php

$allowed = array('gif', 'png', 'jpg');
$filename = $_FILES['video_file']['name'];
$ext = pathinfo($filename, PATHINFO_EXTENSION);
if (!in_array($ext, $allowed)) {
    echo 'error';
}
Comment

PREVIOUS NEXT
Code Example
Php :: php-fpm docker 
Php :: how to show image in laravel 
Php :: check if array is empty php 
Php :: route group in laravel 
Php :: laravel livewire-datatable delete column pop up issue 
Php :: php http errorcode 
Php :: laravel custom validation message 
Php :: model hasmany laravel 
Php :: put woocommerce orders on pending payment automatically 
Php :: rename migration laravel 
Php :: generate entities symfony 
Php :: laravel collection get unique values 
Php :: Stored Procedures in Laravel 
Php :: wordpress custom post type query 
Php :: get all post 
Php :: php send json post 
Php :: generate unique order id in php 
Php :: use php var in js 
Php :: laravel update query builder 
Php :: laravel capsule schema datatime CURRENT_TIMESTAMP 
Php :: get all class methods php 
Php :: Carbon Add Years To Date In Laravel 
Php :: php lowercase function 
Php :: mysqli exception handling 
Php :: laravel all fillable 
Php :: minishlink/web-push v5.2.5 requires ext-gmp * 
Php :: php self referencing form 
Php :: laravel create on model 
Php :: localhost redirected you too many times. php 
Php :: array length php 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =