Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What is proccess to get the file extension in PHP ?

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 93
    Comment on it

    Hi Reader's,
    Welcome to FindNerd, today we are going to discuss What is process to get file extension in PHP ?
    There are many ways for getting the file format or extension of any file.

    In bellow example you can see how to get the file format/extension of file in PHP ?

    <?php
    
    //here define a  $Extname variable and call explode()
    $Extname= explode('.', $_FILES['image']['name']);// here  $Extname will be explode by (.)
    //here define  $filename  variable and call end()
     $Fileext = end($Fileext);
    
    ?>
    
    So when you will use  end() then, the last string will be your's file extension.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: