File::URL()

Converts private file path to public URL.

Table of Contents
  1. Description
  2. Example

Description

File::URL(): ?string;

This method converts private file path to public URL.

Example

$file = new File('.\path\to\file.txt');

echo $file->url(); // Returns `'http://127.0.0.1/path/to/file.txt'`

Class methods are case-insensitive in PHP.

File::URL()

Converts private file path to public URL.

File::size()

Gets the file sizes in human readable string format.