1

Topic: read file extension

$ftmp = $_FILES['image']['tmp_name'];
$oname = $_FILES['image']['name'];
$oname = str_replace(" ","_",$oname);
$oname = str_replace("%20","",$oname);
$fname = $uploaddir.$oname;

        $fileInfo = pathinfo($fname);
        $extension = strtolower($fileInfo["extension"]);    

                                // do your work here... :)

so you can just use the $extension to make more condition...


Warning: Undefined variable $pattern_callback in /var/www/vhosts/ctw/include/parser.php on line 820

Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /var/www/vhosts/ctw/include/parser.php:820 Stack trace: #0 /var/www/vhosts/ctw/include/parser.php(1037): do_bbcode() #1 /var/www/vhosts/ctw/viewtopic.php(532): parse_signature() #2 {main} thrown in /var/www/vhosts/ctw/include/parser.php on line 820