Open Source Content Management System

$object->serveattachment

  1. Description

$object->serveattachment -- Serve a record attachment

Description

`boolean **$object->serveattachment** (string name)`

Minimum version: Midgard 1.4 (Bifrost)

Sends the Content-Type header, any other headers specified with Header, and the content of a record attachment. As with any other function that sends headers, the function needs to be called before any other output, and exit() should be called immediately afterwards.

Returns TRUE on success, FALSE on failure.

serveattachment("readmore.html");  
      exit();  
    ?>

Method available for: article, element, event, event_member, group, host, member, page, pageelement, pagelink, person, preference, sitegroup, snippet, snippetdir, style and topic objects.

Designed by Nemein, hosted by Anykey