This package is deprecated Please consider using an stable alternative for any production code.


Starting with version 1.1.0 all URI objects are defined in the League\Uri namespace. The League\Uri\Schemes namespace is deprecated and will be removed in the next major release.

To ease working with FTP URIs, the library comes bundle with a URI specific FTP class League\Uri\Ftp.


The scheme of a FTP URI must be equal to ftp or be undefined. It can not contains a query and or a fragment component.

Adding contents to the fragment or query components throws an UriException exception


use League\Uri;

$uri = Uri\Ftp::createFromString(';type=i');
$uri->withQuery('p=1'); // will throw an League\Uri\UriException

Apart from the fragment, the query components and the scheme definition, the FTP URIs share the same validation rules as Http URIs.