Actions

API16

JInstallerHelper/getFilenameFromURL

From Joomla! Documentation

< API16:JInstallerHelper
Revision as of 17:36, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Gets a file name out of a url

[Edit Descripton]

Description:JInstallerHelper/getFilenameFromURL

Syntax

getFilenameFromURL($url)
Parameter Name Default Value Description
$url $url URL to get name from

Returns

mixed String filename or boolean false if failed

Defined in

libraries/joomla/installer/helper.php

Importing

jimport( 'joomla.installer.helper' );

Source Body

function getFilenameFromURL($url)
{
        if (is_string($url))
        {
                $parts = explode('/', $url);
                return $parts[count($parts) - 1];
        }
        return false;
}

[Edit See Also] SeeAlso:JInstallerHelper/getFilenameFromURL

Examples

<CodeExamplesForm />