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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 390
    Comment on it

    Hello friends,

    Today we will discuss how to get file extension in Joomla. In Joomla, getExt() function is used for this purpose.

    Syntax:

    $ext =  JFile::getExt($filename);

    JFile is the name of the class in which getExit method is defined. $filename is the name of the file whose extension we need to find out.

    Let's take an example to understand the function.

    <?php
    $filename="component.php";
    $ext =  JFile::getExt($filename);
    echo $ext;
    ?>

    In above example we have taken a file component.php whose extension we need to find out. It will return the php as output.

 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: