$filename = 'file.jpg';
//透過explode()與end()
$explode = explode('.', $filename);
$ext = end($explode);
//結果為jpg
echo $ext;
//透過explode()與end()
$explode = explode('.', $filename);
$ext = end($explode);
//結果為jpg
echo $ext;
文章標籤
全站熱搜
留言列表