Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

mixed fm_save_file ( string $message [, string $default_file_name [, string $initial_folder_path ]] )


 

Description


Allows you to present a dialog asking the user to select the location and file name for a file to be saved to disk. 

 

Parameters


message (required)

The message to be displayed in the dialog.

default_file_name (optional)

The default file name to be entered in the file name field. This can be changed by the user if they want to enter a different file name.

initial_folder_path (optional)

The starting folder for the dialog.

 

Return


Returns the path to the saved file or false if the user cancels.

 

Errors


315 Function not supported on server

 

Code Block
languagephp
themeEclipse
language
php
titleExample 1 - Prompt the user to save a report
$path = fm_save_file('Where would you like to save the report?', 'Report.html', FM_DESKTOP_PATH);
echo $path;
/*
/

Returns: /Users/Scodigo/Desktop/Report.html
*/

Change Log

VersionDescription
3.0.0Function now returns error 315 when executed on FileMaker Server.