Skip to content
Sitemason - Build on Us

SMFile Class Reference

Methods

getCaption

(string) getCaption()
A string
6.0

Information

Returns the data in the caption field.

getFilename

(string) getFilename()
The filename
6.0

Information

Returns the filename and extension of the file.

	

// if $file's URL is http://www.mydomain.com/certificate.pdf

$filename = $file->getFilename;
echo $filename;

// prints "certificate.pdf"

getURL

(string) getURL ()
The URL of the file
6.0

Information

Returns a URL for the file.

	

$url = $file->getURL();
echo '<a href="'. $url .'">Download</a>';