Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to get the file format/extension of file in PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 202
    Comment on it

    Getting the file format or extension of any file can be done by various ways, In PHP you can use the one way as written bellow

    $FileName = explode('.', $_FILES['photo']['name']);
    $FileFormat = end($FileName);
    

    Using the explode your $FilesName will be explode by (.) and after that using 'end' 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: