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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 378
    Comment on it

    Hello Friends,

    Today we will discuss how to get a filename without extension in Joomla. In Joomla, stripExt() function is used for this purpose. It will return the name of the file without extension.

    Syntax:

    $name = JFile::stripExt($filename);

    In above syntax, JFile is the name of the class in which stripExt() function is defined. $filename is the name of the file whose name we required.

    Let's take an example to understand this function.

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

    The above example returns the following output:

    component

     

 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: