Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get extension from filename php

// your file
$file = 'image.jpg';
$info = pathinfo($file);
// Before PHP 5.2
$file_name =  basename($file, '.'.$info['extension']);
// After PHP 5.2
$file_name =  $info['filename'];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #extension #filename #php
ADD COMMENT
Topic
Name
1+8 =