php - Get the file extension -
i'm exploding on "." file format , name:
list($txt, $ext) = explode(".", $name); the problem files have names dots.
how explote on last "." $name=pic.n2 , $ext=jpg from: pic.n2.jpg?
use pathinfo:
$pi = pathinfo($name); $txt = $pi['filename']; $ext = $pi['extension'];
Comments
Post a Comment