Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

validar tipo de imagen php

$permitidos = array("image/jpg", "image/jpeg", "image/gif", "image/png");
    $limite_kb = 16384;
    if(in_array($_FILES['imagenTicket']['type'], $permitidos) && $_FILES['imagenTicket']['size'] <= $limite_kb * 1024) {
        echo "Se valio";
    } else {
        echo "No se valio";
    }
Source by es.stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #validar #tipo #de #imagen #php
ADD COMMENT
Topic
Name
9+5 =